Skip to content

Commit d831d60

Browse files
committed
MPAE-4702: Updated FreeRTOS codebase to V10.4.0, also included new AVR device defines
1 parent 9bbc233 commit d831d60

File tree

219 files changed

+19107
-192456
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

219 files changed

+19107
-192456
lines changed

.main-meta/main.json

Lines changed: 55 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,27 @@
33
"category": "com.microchip.ide.project",
44
"content": {
55
"metaDataVersion": "1.1.0",
6-
"name": "com.microchip.mcu8.mplabx.project.",
7-
"version": " ",
8-
"displayName": " ",
9-
"projectName": "",
10-
"shortDescription": "",
6+
"name": "com.microchip.mcu8.mplabx.project.atmega4809-cnano-getting-started-with-freertos-mplab",
7+
"version": "1.0.0",
8+
"displayName": "Getting Started with FreeRTOS on megaAVR® 0-series",
9+
"projectName": "atmega4809-cnano-getting-started-with-freertos-mplab",
10+
"shortDescription": "This is an example of how to get started with FreeRTOS™ on the AVR architecture with ATmega4809 Curiosity Nano. FreeRTOS™ is a real-time operative system kernel which allows the MCU to operate with different tasks simultaneously. This is accomplished with mutexes, semaphores and software timers.",
1111
"ide": {
12-
"name": "",
13-
"semverRange": ""
12+
"name": "MPLABX",
13+
"semverRange": ">=5.40"
1414
},
1515
"compiler": [
16-
{
17-
"name": "",
18-
"semverRange": ""
19-
}
20-
],
16+
{
17+
"name": "XC8",
18+
"semverRange": "^2.20"
19+
}
20+
],
2121
"dfp": {
22-
"name": "",
23-
"semverRange": ""
22+
"name": "ATmega_DFP",
23+
"semverRange": "^2.2.108"
2424
},
2525
"configurator": {
26-
"name": "",
26+
"name": "N/A",
2727
"semverRange": ""
2828
},
2929
"device": {
@@ -32,37 +32,57 @@
3232
"content": {
3333
"metaDataVersion": "1.0.0",
3434
"category": "com.microchip.device",
35-
"name": "",
35+
"name": "ATmega4809",
3636
"versionRange": "*"
3737
}
3838
},
39-
"author": "",
39+
"author": "Microchip",
4040
"subcategories": [
41-
"",
4241
[
43-
"Peripherals", ""
42+
"Peripherals",
43+
"USART"
44+
],
45+
[
46+
"Peripherals",
47+
"SPI"
4448
],
4549
[
46-
"Peripherals", ""
47-
]
50+
"Peripherals",
51+
"TCB"
52+
],
53+
[
54+
"Peripherals",
55+
"GPIO"
56+
],
57+
[
58+
"Development Kit",
59+
"ATmega4809 Curiosity Nano"
60+
],
61+
[
62+
"Supporting Tools",
63+
"MPLAB Data Visualizer"
64+
]
4865
],
4966
"peripherals": [
50-
"",""
67+
"USART",
68+
"SPI",
69+
"TCB",
70+
"GPIO"
5171
],
5272
"keywords": [
5373
"",
54-
""
74+
""
5575
],
56-
"additionalData": {
57-
"longDescription": {
58-
"metaDataVersion": "1.0.0",
59-
"category": "com.microchip.portal.fileRef",
60-
"content": {
61-
"metaDataVersion": "1.0.0",
62-
"fileName": "./README.md",
63-
"mimeType": "text/markdown"
64-
}
65-
}
66-
}
67-
}
76+
"additionalData": {
77+
"longDescription": {
78+
"metaDataVersion": "1.0.0",
79+
"category": "com.microchip.portal.fileRef",
80+
"content": {
81+
"metaDataVersion": "1.0.0",
82+
"fileName": "./README.md",
83+
"mimeType": "text/markdown"
84+
}
85+
}
86+
}
87+
}
6888
}

atmega4809-cnano-getting-started-with-freertos-mplab.X/AtmelStart.env_conf

Lines changed: 0 additions & 20 deletions
This file was deleted.

atmega4809-cnano-getting-started-with-freertos-mplab.X/AtmelStart.gpdsc

Lines changed: 0 additions & 145 deletions
This file was deleted.

atmega4809-cnano-getting-started-with-freertos-mplab.X/FreeRTOSConfig.h

Lines changed: 30 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,35 @@
3838
#include <avr/io.h>
3939
#undef TCB_t
4040

41+
/*
42+
* Timer instance | Value
43+
* ----------------|---------
44+
* TCB0 | 0
45+
* TCB1 | 1
46+
* TCB2 | 2
47+
* TCB3 | 3
48+
* RTC | 4
49+
*/
50+
51+
#define configUSE_TIMER_INSTANCE 0
4152
#define configUSE_PREEMPTION 1
42-
#define configCPU_CLOCK_HZ (20e6 / 2)
53+
54+
/* NOTE: You can choose the following clock frequencies (Hz):
55+
20000000, 10000000, 5000000, 2000000.
56+
For other frequency values, update clock_config.h with your own settings. */
57+
#define configCPU_CLOCK_HZ 10000000
58+
4359
#define configTICK_RATE_HZ 1000
4460
#define configMAX_PRIORITIES 4
45-
#define configMINIMAL_STACK_SIZE 115
61+
#define configMINIMAL_STACK_SIZE 110
4662
#define configMAX_TASK_NAME_LEN 8
4763
#define configUSE_16_BIT_TICKS 1
4864
#define configIDLE_SHOULD_YIELD 1
4965
#define configUSE_TASK_NOTIFICATIONS 1
5066
#define configUSE_MUTEXES 1
51-
#define configUSE_RECURSIVE_MUTEXES 0
67+
#define configUSE_RECURSIVE_MUTEXES 1
5268
#define configUSE_COUNTING_SEMAPHORES 0
53-
#define configQUEUE_REGISTRY_SIZE 0
69+
#define configQUEUE_REGISTRY_SIZE 2
5470
#define configUSE_QUEUE_SETS 0
5571
#define configUSE_TIME_SLICING 1
5672
#define configUSE_NEWLIB_REENTRANT 0
@@ -60,7 +76,7 @@
6076
/* Memory allocation related definitions. */
6177
#define configSUPPORT_STATIC_ALLOCATION 0
6278
#define configSUPPORT_DYNAMIC_ALLOCATION 1
63-
#define configTOTAL_HEAP_SIZE 0x800
79+
#define configTOTAL_HEAP_SIZE 0x1000
6480
#define configAPPLICATION_ALLOCATED_HEAP 0
6581

6682
/* Hook function related definitions. */
@@ -76,20 +92,20 @@
7692
#define configUSE_STATS_FORMATTING_FUNCTIONS 0
7793

7894
/* Co-routine related definitions. */
79-
#define configUSE_CO_ROUTINES 0
80-
#define configMAX_CO_ROUTINE_PRIORITIES 1
95+
#define configUSE_CO_ROUTINES 1
96+
#define configMAX_CO_ROUTINE_PRIORITIES 2
8197

8298
/* Software timer related definitions. */
83-
#define configUSE_TIMERS 0
84-
#define configTIMER_TASK_PRIORITY 3
85-
#define configTIMER_QUEUE_LENGTH 10
86-
#define configTIMER_TASK_STACK_DEPTH configMINIMAL_STACK_SIZE
99+
#define configUSE_TIMERS 1
100+
#define configTIMER_TASK_PRIORITY ( configMAX_PRIORITIES - 1 )
101+
#define configTIMER_QUEUE_LENGTH 5
102+
#define configTIMER_TASK_STACK_DEPTH ( configMINIMAL_STACK_SIZE * 2 )
87103

88104
/* Define to trap errors during development. */
89105
//#define configASSERT( x ) if( ( x ) == 0 ) { asm volatile ("cli"); while(1){ asm volatile ("BREAK"); } }
90106

91107
/* Optional functions - most linkers will remove unused functions anyway. */
92-
#define INCLUDE_vTaskPrioritySet 0
108+
#define INCLUDE_vTaskPrioritySet 1
93109
#define INCLUDE_uxTaskPriorityGet 0
94110
#define INCLUDE_vTaskDelete 0
95111
#define INCLUDE_vTaskSuspend 1
@@ -109,4 +125,6 @@
109125

110126
#define pdMS_TO_TICKS(xTimeInMs) ((TickType_t)(((uint32_t)(xTimeInMs) * (uint32_t)configTICK_RATE_HZ) / (uint32_t)1000))
111127

128+
#define recmuRECURSIVE_MUTEX_TEST_TASK_STACK_SIZE ( configMINIMAL_STACK_SIZE * 2 )
129+
112130
#endif /* FREERTOS_CONFIG_H */

atmega4809-cnano-getting-started-with-freertos-mplab.X/atmel_start.c

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)