AnsweredAssumed Answered

FNET K64 platform download MQX application problems

Question asked by changnian le on May 15, 2015
Latest reply on May 18, 2015 by soledad

Hello:

Now doing a project, is through the TFTP to download the application.

I am using FNET bootloader that support the TFTP download this open source project.

The development environment is IAR7.2 TWR - K64F120M development board.

I do the test with the two applications, including the “hello_world” KSDK has been successfully downloaded to a flash and can run normally, in serial print “Hello World”!But with “hello” MQX system engineering can't run normally.According to https://community.freescale.com/message/332455#332455 this article finished the relevant configuration.

I revised the icf file:

/*###ICF### Section handled by ICF editor, don't touch! ****/
/*-Editor annotation file-*/
/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
/*-Specials-*/
define symbol __ICFEDIT_intvec_start__ = 0x0000C000;
/*-Memory Regions-*/
define symbol __ICFEDIT_region_ROM_start__   = 0x0000C420 ;
define symbol __ICFEDIT_region_ROM_end__     = 0x000FEFFF;

define symbol __ICFEDIT_region_RAM_start__   = 0x1FFF0000;
define symbol __ICFEDIT_region_RAM_end__     = 0x2002FFF0;
/*-Sizes-*/
define symbol __ICFEDIT_size_cstack__   = 0;
define symbol __ICFEDIT_size_heap__     = 0;
/**** End of ICF editor section. ###ICF###*/

define exported symbol __EXTERNAL_MRAM_ROM_BASE = 0x60000000;
define exported symbol __EXTERNAL_MRAM_ROM_SIZE = 0x00000000;
define exported symbol __EXTERNAL_MRAM_RAM_BASE = 0x60000000;
define exported symbol __EXTERNAL_MRAM_RAM_SIZE = 0x00080000;

define exported symbol __EXTERNAL_LCD_BASE      = 0x60000000;
define exported symbol __EXTERNAL_LCD_SIZE      = 0x1FFFF;
define exported symbol __EXTERNAL_LCD_DC_BASE   = 0x60010000;
define exported symbol __INTERNAL_FLASH_BASE    = 0x0000C000;
define exported symbol __INTERNAL_FLASH_SIZE    = 0x000F2BE0;

define exported symbol __INTERNAL_SRAM_BASE     = 0x1FFF0000;
define exported symbol __INTERNAL_SRAM_SIZE     = 0x00040000;
define exported symbol __SRAM_POOL              = 0x1FFF0000;

define exported symbol __INTERNAL_FLEXNVM_BASE = 0;
define exported symbol __INTERNAL_FLEXNVM_SIZE = 0;

define exported symbol __VECTOR_TABLE_ROM_START = 0x0000C000;
define exported symbol __VECTOR_TABLE_RAM_START = __ICFEDIT_region_RAM_start__;

define exported symbol __DEFAULT_PROCESSOR_NUMBER = 1;
define exported symbol __DEFAULT_INTERRUPT_STACK_SIZE = 1024;

/* mem_init writes a storeblock_struct at the end of kernel data, max size 32 bytes, so use 0x100 offset */
define exported symbol __BOOT_STACK_ADDRESS = __ICFEDIT_region_RAM_end__ - 0x100;


define exported symbol __KERNEL_DATA_END = __ICFEDIT_region_RAM_end__;

define memory mem with size = 4G;
define region ROM_region   = mem:[from __ICFEDIT_region_ROM_start__   to __ICFEDIT_region_ROM_end__];
define region RAM_region   = mem:[from __ICFEDIT_region_RAM_start__   to __ICFEDIT_region_RAM_end__];

define block KERNEL_DATA with alignment = 8 { section .kernel_data };

define exported symbol __FLASHX_SECT_SIZE = 0x1000;
define exported symbol __FLASHX_END_ADDR = __INTERNAL_FLASH_BASE + __INTERNAL_FLASH_SIZE;

define block CFMPROTROM with size = 20 { section .cfmconfig };
define block FLASHX_POOL with alignment = __FLASHX_SECT_SIZE { section .flashx };
define block TEXTSECTION with alignment = 4 { section .text };
keep { section .cfmconfig };
keep { section .flashx };

initialize by copy { readwrite };
do not initialize  { section .noinit };
do not initialize  { section .kernel_data };
do not initialize  { section .flashx };

place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec, block CFMPROTROM };
place in ROM_region { first block TEXTSECTION, readonly,  last block FLASHX_POOL };

place at address mem:__ICFEDIT_region_RAM_start__ { readwrite section .vectors_ram };

/* each block/segment must be in one line (association to region) because I need kernel data start after other datas */
place in RAM_region   { readwrite, last block KERNEL_DATA };

 

In user_config. H file to add definition:

# define MQX_ROM_VECTORS 0

Recompile the MQX lib project.To recompile the hello project (application).

 

Modify the IAR default program entrance

1.PNG

 

Sent via download after the bootloader "go" command, can't jump into application execution.Test and operation in the "go" command made a breakpoint, without MQX system (KSDK) engineering directly run directly after the "go" command.Take MQX system engineering "go" The order came after a warning:

Fri May 15, 2015 15:05:54: The stack pointer for The stack 'CSTACK (currently 0 x1fff0900) is outside The stack range (0 x2002f000 to 0 x20030000) and then stop running.

 

Is beyond the scope stack.Whether icf file not configured, because is k60 articles.what I use is k64!

 

Need your help, Thanks in advance.

Outcomes