Ensure that main() is always placed in low memory in the IAR MSP430X port.

This commit is contained in:
Richard Barry 2011-01-01 20:56:23 +00:00
parent a9b61c4e00
commit 811413d95a
7 changed files with 20 additions and 18 deletions

View file

@ -179,7 +179,7 @@ information. */
#define mainCOM_TEST_LED ( 1 )
/* The baud rate used by the comtest tasks described at the top of this file. */
#define mainCOM_TEST_BAUD_RATE ( 115200 )
#define mainCOM_TEST_BAUD_RATE ( 38400 )
/* The maximum number of lines of text that can be displayed on the LCD. */
#define mainMAX_LCD_LINES ( 8 )
@ -236,6 +236,11 @@ typedef struct
/*-----------------------------------------------------------*/
/* 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. The ISR_CODE segment is used for convenience as ISR
functions are always placed in low memory. */
#pragma location="ISR_CODE"
void main( void )
{
/* Configure the peripherals used by this demo application. This includes
@ -263,8 +268,8 @@ void main( void )
the top of this file. */
xTaskCreate( prvLCDTask, ( signed char * ) "LCD", configMINIMAL_STACK_SIZE * 2, NULL, mainLCD_TASK_PRIORITY, NULL );
xTaskCreate( prvButtonPollTask, ( signed char * ) "BPoll", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
xTaskCreate( vRegTest1Task, "Reg1", configMINIMAL_STACK_SIZE, NULL, 0, NULL );
xTaskCreate( vRegTest2Task, "Reg2", configMINIMAL_STACK_SIZE, NULL, 0, NULL );
xTaskCreate( vRegTest1Task, ( signed char * ) "Reg1", configMINIMAL_STACK_SIZE, NULL, 0, NULL );
xTaskCreate( vRegTest2Task, ( signed char * ) "Reg2", configMINIMAL_STACK_SIZE, NULL, 0, NULL );
/* Start the scheduler. */
vTaskStartScheduler();