AnsweredAssumed Answered

LPC1754 BootLoader+APP(IAP updata)

Question asked by Zchao 郑 on Feb 20, 2020
Latest reply on Mar 9, 2020 by Alexis Andalon

english:     

 I recently used the LPC1754 chip, and after adding BootLoader, the app and BootLoader were merged into.bin or.hex through Jlink to burn, the machine could run normally. With the serial port upgrade (custom protocol, bin file upgrade), the app would run and enter the hardware interrupt.Even more bizarre is the problem of upgrading multiple machines, most of which are normal and some of which are not.After the program ran, I used Jlink to read the program of the chip, and compared with the upgraded bin file, there was no difference. Then I used Jlink to burn the program, and the program ran normally.(app and BootLoader are bare, without real-time system)

      BootLoader and app stacks are modified without any help.

      System startup file startup_lpc17x.s, app blocked CRP_Key program segment, BootLoader did not block.App and BootLoader blocked and unblocked have tried, no help.

(The procedure is as follows:)

/*

; IF :LNOT::DEF:NO_CRP
; AREA |.ARM.__at_0x02FC|, CODE, READONLY
;CRP_Key DCD 0xFFFFFFFF
; ENDIF

*/

      Finally, the upgrade can be normal after the upgrade of the machine is normal, abnormal is not fixed.Excuse me boss, how to solve this problem, tangle me for a long time.

 

中文:

      我最近用了LPC1754芯片,加了BootLoader后,app和BootLoader合并成.bin或者.hex通过Jlink烧录,机器都能正常运行,用串口升级(自定义协议,bin文件升级),app就会跑飞,进入硬件中断。更奇葩的问题就是,升级多台机器,大部分机器升级都正常,小部分不正常。在程序跑飞后,我用Jlink读取芯片的程序,跟升级的bin文件比较,并无差异,再用Jlink烧录,程序就正常运行。(app和BootLoader都是裸机,没有实时系统)
      BootLoader和app的堆栈都进行修改,没有任何帮助。

      系统启动文件startup_LPC17xx.s中,app屏蔽了CRP_Key程序段,BootLoader没有屏蔽。app和BootLoader屏蔽和不屏蔽都尝试过,没帮助。

(程序如下:)

/*

; IF :LNOT::DEF:NO_CRP
; AREA |.ARM.__at_0x02FC|, CODE, READONLY
;CRP_Key DCD 0xFFFFFFFF
; ENDIF

*/

      最后,升级后能正常的机器再升级也正常,有异常的也是不能修复。请问大佬,这个问题怎么解决,纠结我好久了。

Outcomes