How does it work when image bigger than programmable flash?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

How does it work when image bigger than programmable flash?

跳至解决方案
3,595 次查看
tonymakkiel
Contributor III

Hi All,

          I am a bit confused. The image 'elf file' is 319,831 bytes. But as per the description for KL43Z48M, it should only have 256KB (262,144 bytes) memory.  But yet the board boots and run. How does that work?

Many Thanks,

Tony

标签 (1)
标记 (1)
0 项奖励
回复
1 解答
3,411 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Tony,

The *.lef file is not an image in binary format which is copied to flash byte by byte, the *.elf contains a lot of debugging information, that is why it is large.

I attach the doc about the format of *.elf file.

Hope it can help you.

BR

XiangJun Rong

在原帖中查看解决方案

0 项奖励
回复
4 回复数
3,412 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Tony,

The *.lef file is not an image in binary format which is copied to flash byte by byte, the *.elf contains a lot of debugging information, that is why it is large.

I attach the doc about the format of *.elf file.

Hope it can help you.

BR

XiangJun Rong

0 项奖励
回复
3,411 次查看
tonymakkiel
Contributor III

Thank you XiangJun Rong,

Is there an api (similar to NVIC_SystemReset) which can be used from the application to reset the board to (ROM) bootloader mode? I know there is a boot pin. But would like to do it from the application, if possible.

0 项奖励
回复
3,411 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Tony,

I think the software reset is the only way you can use in your application code to reset the processor and run from bootloader ROM, in other words, you can call the NVIC_SystemReset() api function to software reset the chip. If you want to use bootloader, you have to set the other register and flash, for example, the BCA block, FOPT register, RCM_MR register.

For detailed inf, pls refer to section 13.3 Functional Description in the reference manual of KL43.

Hope it can help you

BR

XiangJun Rong

0 项奖励
回复
3,411 次查看
tonymakkiel
Contributor III

Hi XiangJun Rong,

             Thank you for the pointer. Before I start putting the board in bootloader mode, with application would like to make sure blhost works with the board. I tried manually putting the board in bootloader mode (inserted usb on J8 with reset button SW1 pressed). I have RS232 connected to TWR_SER board. But for some reason cant get blhost to work.

./Release/blhost -p /dev/ttyUSB0 -d get-property 1

[5a a6]

<stuck here>

What is the default baudrate ROM will be listening?

Many Thanks,

Tony

0 项奖励
回复