Skip to content

Commit f5b5b2d

Browse files
committed
Cleaning up LPC51U68 projects:
- user playable settings are all in FreeRTOSConfig.h. - removed reference to IntQueue.h in main_full.c - readme.txt wording.
1 parent 2415dc2 commit f5b5b2d

File tree

9 files changed

+37
-33
lines changed

9 files changed

+37
-33
lines changed

FreeRTOS/Demo/CORTEX_M0+_LPC51U68_GCC_IAR_KEIL/.project

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
<link>
3939
<name>Demo_tasks/IntQueue.c</name>
4040
<type>1</type>
41-
<locationURI>PARENT-1-PROJECT_LOC/Common/Minimal/IntQueue.c</locationURI>
41+
<location>C:/Users/yuhzheng/Documents/freertos-code/FreeRTOS/Demo/Common/Minimal/IntQueue.c</location>
4242
</link>
4343
<link>
4444
<name>Demo_tasks/blocktim.c</name>

FreeRTOS/Demo/CORTEX_M0+_LPC51U68_GCC_IAR_KEIL/CORTEX_M0+_LPC51U68_Keil.uvoptx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@
162162
<DebugFlag>
163163
<trace>0</trace>
164164
<periodic>1</periodic>
165-
<aLwin>1</aLwin>
165+
<aLwin>0</aLwin>
166166
<aCover>0</aCover>
167167
<aSer1>0</aSer1>
168168
<aSer2>0</aSer2>
@@ -210,7 +210,7 @@
210210

211211
<Group>
212212
<GroupName>Application_Code</GroupName>
213-
<tvExp>0</tvExp>
213+
<tvExp>1</tvExp>
214214
<tvExpOptDlg>0</tvExpOptDlg>
215215
<cbSel>0</cbSel>
216216
<RteFlg>0</RteFlg>
@@ -854,7 +854,7 @@
854854

855855
<Group>
856856
<GroupName>startup</GroupName>
857-
<tvExp>0</tvExp>
857+
<tvExp>1</tvExp>
858858
<tvExpOptDlg>0</tvExpOptDlg>
859859
<cbSel>0</cbSel>
860860
<RteFlg>0</RteFlg>
-12.5 KB
Binary file not shown.
-12.5 KB
Binary file not shown.

FreeRTOS/Demo/CORTEX_M0+_LPC51U68_GCC_IAR_KEIL/Keil_specific/compiler_attributes.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,9 @@
2929
todo:
3030
this is commented out intentionally, as it doesn't seem to work.
3131
Clean up is needed*/
32-
#define COMPILER_ATTRIBUTE_PLACE_IN_2ND_MEMORY_BANK //__attribute__((section("m_data_start")))
32+
33+
/* Attribute to place the second FreeRTOS heap in another memory bank, if present.
34+
This is defined as empty, as the linker file (LPC51U68_flash.scf) provided only
35+
one bank as heap. Could still have two FreeRTOS heap regions, as long as they fit.
36+
*/
37+
#define COMPILER_ATTRIBUTE_PLACE_IN_2ND_MEMORY_BANK

FreeRTOS/Demo/CORTEX_M0+_LPC51U68_GCC_IAR_KEIL/app/FreeRTOSConfig.h

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,22 @@
4141
* See http://www.freertos.org/a00110.html
4242
*----------------------------------------------------------*/
4343

44+
/* Demo related settings. */
45+
46+
/* Set mainCREATE_SIMPLE_BLINKY_DEMO_ONLY to
47+
* 0 -- to run the more comprehensive test and demo application,
48+
* 1 -- to run the simple blinky demo.
49+
*/
50+
#define mainCREATE_SIMPLE_BLINKY_DEMO_ONLY 1
51+
52+
/* When mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 0,
53+
* set mainNO_TASK_NO_CHECK to
54+
* 0 -- to include all predefined test tasks and checks,
55+
* 1 -- to exclude all predefined test tasks and checks.
56+
* When set to 1 (with few tasks in system), user could observe
57+
* fewer tick interrupts thus reduce overall MCU power consumption. */
58+
#define mainNO_TASK_NO_CHECK 0
59+
4460
/* Prevent C code being included by the IAR assembler. */
4561
#ifndef __IASMARM__
4662
#include <stdint.h>
@@ -52,8 +68,8 @@
5268
#define configUSE_TICK_HOOK 1
5369
#define configCPU_CLOCK_HZ ( SystemCoreClock )
5470
#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )
55-
#define configMAX_PRIORITIES ( 5 )
56-
#define configMAX_TASK_NAME_LEN ( 5 )
71+
#define configMAX_PRIORITIES 5
72+
#define configMAX_TASK_NAME_LEN 8
5773
#define configUSE_TRACE_FACILITY 1
5874
#define configUSE_16_BIT_TICKS 0
5975
#define configIDLE_SHOULD_YIELD 1
@@ -80,7 +96,7 @@
8096

8197
/* Software timer definitions. */
8298
#define configUSE_TIMERS 1
83-
#define configTIMER_TASK_PRIORITY ( 2 )
99+
#define configTIMER_TASK_PRIORITY 2
84100
#define configTIMER_QUEUE_LENGTH 2
85101
#define configTIMER_TASK_STACK_DEPTH ( configMINIMAL_STACK_SIZE )
86102

FreeRTOS/Demo/CORTEX_M0+_LPC51U68_GCC_IAR_KEIL/app/main.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,6 @@
4848

4949
#include "compiler_attributes.h"
5050

51-
/* Set mainCREATE_SIMPLE_BLINKY_DEMO_ONLY to
52-
* 0 -- to run the more comprehensive test and demo application,
53-
* 1 -- to run the simple blinky demo.
54-
*/
55-
#define mainCREATE_SIMPLE_BLINKY_DEMO_ONLY 0
56-
5751
/*-----------------------------------------------------------*/
5852
typedef enum LED_STATE {
5953
LED_RED_BLINK_ON = 1,

FreeRTOS/Demo/CORTEX_M0+_LPC51U68_GCC_IAR_KEIL/app/main_full.c

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,6 @@
8383
#include "blocktim.h"
8484
#include "countsem.h"
8585
#include "recmutex.h"
86-
#include "IntQueue.h"
87-
8886

8987
/* The period after which the check timer will expire provided no errors have
9088
been reported by any of the standard demo tasks. ms are converted to the
@@ -99,12 +97,6 @@ in ticks using the portTICK_PERIOD_MS constant. */
9997
/* A block time of zero simply means "don't block". */
10098
#define mainDONT_BLOCK ( 0UL )
10199

102-
/* Set mainNO_TASK_NO_CHECK to
103-
* 0 -- to include all predefined test tasks and checks,
104-
* 1 -- to exclude all predefined test tasks and checks.
105-
* When set to 1 (with few tasks in system), user could observe how tickless
106-
* idle could minimize tick interrupt. */
107-
#define mainNO_TASK_NO_CHECK ( 1 )
108100
/*-----------------------------------------------------------*/
109101

110102
/*
@@ -155,7 +147,6 @@ TimerHandle_t xCheckTimer = NULL;
155147
#if ( mainNO_TASK_NO_CHECK == 0 )
156148
/* Create the standard demo tasks, including the interrupt nesting test
157149
tasks. */
158-
vStartInterruptQueueTasks();
159150
vCreateBlockTimeTasks();
160151
vStartCountingSemaphoreTasks();
161152
vStartRecursiveMutexTasks();
@@ -222,11 +213,6 @@ unsigned long ulErrorFound = pdFALSE;
222213

223214
/* Check all the demo and test tasks to ensure that they are all still
224215
running, and that none have detected an error. */
225-
if( xAreIntQueueTasksStillRunning() != pdPASS )
226-
{
227-
ulErrorFound |= ( 0x01UL << 0UL );
228-
}
229-
230216
if( xAreBlockTimeTestTasksStillRunning() != pdPASS )
231217
{
232218
ulErrorFound |= ( 0x01UL << 1UL );
Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
This directory contains projects for GCC/IAR/Keil compilers. The targeted MCU is NXP LPC51U68, which is CM0+.
1+
This directory contains three projects for LPCXpresso board for LPC51U68.
22

3-
todo:
4-
- clean up IAR compiler warnings. (Though the warnings are in vendor's driver code, see if we can clean it up. )
5-
- finalize Keil linker script.(Two heap blocks shall be placed in intended RAM banks. Currently, both goes to a same RAM bank.)
6-
- GCC project folder directory name is not consistent with the other two.
3+
MCUXpresso IDE (GCC compiler) -- .cproject and .project.
4+
IAR for ARM IDE (IAR compiler) -- CORTEX_M0+_LPC51U68_IAR.*
5+
Keil uVision (ARM Keil compiler) -- CORTEX_M0+_LPC51U68_Keil.*
6+
7+
Known facts:
8+
- IAR compiler shows Pa082 warning with SDK provided system_LPC51U68.c and fsl_usart.c. Since the warnings are legitimate, they are not ignored.
9+
Refer to https://www.iar.com/support/tech-notes/compiler/warningpa082-undefined-behavior-the-order-of-volatile-accesses-is-undefined-in-this-statement/

0 commit comments

Comments
 (0)