mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-09-02 20:33:49 -04:00
Ensure that main() is always placed in low memory in the CCS4 MSP430X port.
This commit is contained in:
parent
811413d95a
commit
8d532ab4a7
6 changed files with 122 additions and 19 deletions
|
@ -80,7 +80,7 @@
|
|||
#define configIDLE_SHOULD_YIELD 1
|
||||
#define configUSE_MUTEXES 1
|
||||
#define configQUEUE_REGISTRY_SIZE 5
|
||||
#define configGENERATE_RUN_TIME_STATS 0
|
||||
#define configGENERATE_RUN_TIME_STATS 1
|
||||
#define configCHECK_FOR_STACK_OVERFLOW 2
|
||||
#define configUSE_RECURSIVE_MUTEXES 0
|
||||
#define configUSE_MALLOC_FAILED_HOOK 1
|
||||
|
@ -108,16 +108,12 @@ vApplicationSetupTimerInterrupt() generates the tick from timer A0, so in this
|
|||
case configTICK_INTERRUPT_VECTOR is set to TIMER0_A0_VECTOR. */
|
||||
#define configTICK_INTERRUPT_VECTOR TIMER0_A0_VECTOR
|
||||
|
||||
/* Prevent the following definitions being included when FreeRTOSConfig.h
|
||||
is included from an asm file. */
|
||||
#ifdef __ICC430__
|
||||
extern void vConfigureTimerForRunTimeStats( void );
|
||||
extern inline unsigned long ulGetRunTimeStatsTime( void );
|
||||
extern volatile unsigned long ulStatsOverflowCount;
|
||||
#endif /* __ICCARM__ */
|
||||
extern void vConfigureTimerForRunTimeStats( void );
|
||||
extern unsigned long ulGetRunTimeStatsTime( void );
|
||||
extern volatile unsigned long ulStatsOverflowCount;
|
||||
|
||||
//#define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() vConfigureTimerForRunTimeStats()
|
||||
//#define portGET_RUN_TIME_COUNTER_VALUE() ulGetRunTimeStatsTime()
|
||||
#define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() vConfigureTimerForRunTimeStats()
|
||||
#define portGET_RUN_TIME_COUNTER_VALUE() ulGetRunTimeStatsTime()
|
||||
|
||||
#endif /* FREERTOS_CONFIG_H */
|
||||
|
||||
|
|
|
@ -96,13 +96,13 @@ void vConfigureTimerForRunTimeStats( void )
|
|||
/*-----------------------------------------------------------*/
|
||||
|
||||
#pragma vector=TIMER1_A0_VECTOR
|
||||
static __interrupt void prvRunTimeStatsOverflowISR( void )
|
||||
interrupt void prvRunTimeStatsOverflowISR( void )
|
||||
{
|
||||
ulStatsOverflowCount++;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
inline unsigned long ulGetRunTimeStatsTime( void )
|
||||
unsigned long ulGetRunTimeStatsTime( void )
|
||||
{
|
||||
unsigned long ulReturn;
|
||||
|
||||
|
|
|
@ -243,6 +243,10 @@ typedef struct
|
|||
*/
|
||||
#error Ensure CreateProjectDirectoryStructure.bat has been executed before building. See comment immediately above.
|
||||
|
||||
/* The linker script tests the FreeRTOS ports use of 20bit addresses by
|
||||
locating all code in high memory. The following pragma ensures that main
|
||||
remains in low memory. */
|
||||
#pragma CODE_SECTION(main,".main")
|
||||
void main( void )
|
||||
{
|
||||
/* Configure the peripherals used by this demo application. This includes
|
||||
|
@ -306,6 +310,7 @@ unsigned char ucLine = 1;
|
|||
First print out the number of bytes that remain in the FreeRTOS heap. This
|
||||
can be viewed in the terminal IO window within the IAR Embedded Workbench. */
|
||||
printf( "%d bytes of heap space remain unallocated\n", ( int ) xPortGetFreeHeapSize() );
|
||||
fflush( stdout );
|
||||
|
||||
for( ;; )
|
||||
{
|
||||
|
@ -342,9 +347,9 @@ unsigned char ucLine = 1;
|
|||
embedded workbench. */
|
||||
printf( "\nTask\t Abs Time\t %%Time\n*****************************************" );
|
||||
fflush( stdout );
|
||||
//vTaskGetRunTimeStats( ( signed char * ) cBuffer );
|
||||
//printf( cBuffer );
|
||||
//fflush( stdout );
|
||||
vTaskGetRunTimeStats( ( signed char * ) cBuffer );
|
||||
printf( cBuffer );
|
||||
fflush( stdout );
|
||||
|
||||
/* Also print out a message to
|
||||
the LCD - in this case the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue