Uploaded code via ISP does not work

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

Uploaded code via ISP does not work

1,042 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by masterboy on Tue Jan 27 05:41:51 MST 2015
Hi all,

I created program (in C #) that my ISP using loaded into the MCU (LPC1114) program stored in a binary file (* .bin). There is a problem, upload the program does not start. Program works when it contains the following:
[img]http://s18.postimg.org/8r165rpa1/image.png[/img]

When you upload the same program from a binary file using my flash program contains:

[img]http://s4.postimg.org/9k248fbh9/image.png[/img]

What does this line mean? How do I determine / calculate this value?
标签 (1)
0 项奖励
回复
4 回复数

1,019 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by masterboy on Wed Jan 28 00:45:35 MST 2015
I use LPCXpresso with "Post-build step":
arm-none-eabi-size "${BuildArtifactFileName}"
arm-none-eabi-objcopy -O binary "${BuildArtifactFileName}" "${BuildArtifactFileBaseName}.bin"
arm-none-eabi-objcopy -O ihex ${BuildArtifactFileName} ${BuildArtifactFileBaseName}.hex


Solution:
arm-none-eabi-size ${BuildArtifactFileName}
arm-none-eabi-objcopy -O binary ${BuildArtifactFileName} ${BuildArtifactFileBaseName}.bin
arm-none-eabi-objcopy -O ihex ${BuildArtifactFileName} ${BuildArtifactFileBaseName}.hex
checksum -p ${TargetChip} -d ${BuildArtifactFileBaseName}.bin
0 项奖励
回复

1,019 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Tue Jan 27 07:11:08 MST 2015

Quote: masterboy
I understand, but how do I do it? Can you give an example?



Where is this bin file generated? Usually toolchains are able to add this checksum...

See: http://www.lpcware.com/content/faq/lpcxpresso/image-checksums
0 项奖励
回复

1,019 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by masterboy on Tue Jan 27 06:58:58 MST 2015
I understand, but how do I do it? Can you give an example?
0 项奖励
回复

1,019 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Tue Jan 27 06:10:50 MST 2015
UM:


Quote:
26.3.3 Criterion for Valid User Code
Criterion for valid user code: The reserved Cortex-M0 exception vector location 7 (offset
[color=#f00]0x 0000 001C in the vector table) should contain the 2’s complement of the check-sum of table entries 0 through 6[/color]. This causes the checksum of the first 8 table entries to be 0. The bootloader code checksums the first 8 locations in sector 0 of the flash. If the result is 0, then execution control is transferred to the user code.

0 项奖励
回复