Using CrossStudio with LPC1788/4088

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Using CrossStudio with LPC1788/4088

Jump to solution
1,337 Views
GeoffF
Contributor II

Hi All,

I've inherited a body of code using Rowley CrossStudio 2.3.5 (yes, I know it's old) and almost zero documentation.  Once upon a time, my predecessor managed to develop and debug a program on the LPC1788, then port it across to the LPC4088.  Unfortunately, there's little detail on how he did this.

Just to make it more fun, the original WIndows 7 machine on which everything was installed suffered a catastrophic disk failure and I'm now running on a Windows 10 build.

Now, with the global semiconductor shortage, we've managed to secure some LPC1788s and have loaded a board with it.  Understandably, I suppose, the LPC4088 code isn't working on it.

Unfortunately, I'm struggling to even connect to the board.  We have an SWD connection and a bunch of different Segger J-Links. One of the J-Links (which apparently my predecessor used to use) keeps telling me the J-Link v5.20 doesn't support SWD,

After some messing around and connecting a J-Link to a different board, I finally managed to Connect to the J-Link rather than the ARM Simulator using CrossStudio.  Now, when I try to download, I get this message:

Checking “hmi430_1405” in configuration “hmi430_1405_Release_Unlocked”
Preparing target for download
  Loading target script file LPC407x_8x_Target.js
  Executing script FLASHReset()
  Failed to halt CPU.
  Cannot read register 0 (R0) while CPU is running
  Cannot read register 1 (R1) while CPU is running
  Cannot read register 2 (R2) while CPU is running
  Cannot read register 3 (R3) while CPU is running
  Cannot read register 4 (R4) while CPU is running
  Cannot read register 5 (R5) while CPU is running
  Cannot read register 6 (R6) while CPU is running
  Cannot read register 7 (R7) while CPU is running
  Cannot read register 8 (R8) while CPU is running
  Cannot read register 9 (R9) while CPU is running
  Cannot read register 10 (R10) while CPU is running
  Cannot read register 11 (R11) while CPU is running
  Cannot read register 12 (R12) while CPU is running
  Cannot read register 13 (R13) while CPU is running
  Cannot read register 14 (R14) while CPU is running
  Cannot read register 15 (R15) while CPU is running
  Cannot read register 16 (XPSR) while CPU is running
  Cannot read register 17 (MSP) while CPU is running
  Cannot read register 18 (PSP) while CPU is running
  Cannot read register 20 (CFBP) while CPU is running
Downloading “Loader_lpc407x_8x_1307.elf” to SEGGER J-Link
  Programming completed in 208 ms — 28,923 bytes/sec
    Programming 5.8 KB of .load_section addresses 10000000 — 1000177f
Verifying completed in 16 ms — 62 bytes/sec
  Verifying completed in 13 ms — 462,769 bytes/sec
    Verifying 5.8 KB of .load_section addresses 10000000 — 1000177f
Verify failed
Preparing target for user application
  Loading target script file LPC407x_8x_Target.js
  Executing script FLASHReset()
  Failed to halt CPU.
  Cannot read register 0 (R0) while CPU is running
  Cannot read register 1 (R1) while CPU is running
  Cannot read register 2 (R2) while CPU is running
  Cannot read register 3 (R3) while CPU is running
  Cannot read register 4 (R4) while CPU is running
  Cannot read register 5 (R5) while CPU is running
  Cannot read register 6 (R6) while CPU is running
  Cannot read register 7 (R7) while CPU is running
  Cannot read register 8 (R8) while CPU is running
  Cannot read register 9 (R9) while CPU is running
  Cannot read register 10 (R10) while CPU is running
  Cannot read register 11 (R11) while CPU is running
  Cannot read register 12 (R12) while CPU is running
  Cannot read register 13 (R13) while CPU is running
  Cannot read register 14 (R14) while CPU is running
  Cannot read register 15 (R15) while CPU is running
  Cannot read register 16 (XPSR) while CPU is running
  Cannot read register 17 (MSP) while CPU is running
  Cannot read register 18 (PSP) while CPU is running
  Cannot read register 20 (CFBP) while CPU is running
Cannot read register 20 (CFBP) while CPU is running
CPU is not halted

I've verified that hitting the "Reset" button on our J-Link/SWD adaptor actually resets the board.

 

Any tips?

Labels (2)
0 Kudos
Reply
1 Solution
1,326 Views
GeoffF
Contributor II

I've managed to get the debugger working.  Basically, this morning after starting my PC I rebuilt the bootloader for the correct architecture and loaded that using FlashMagic.  Now my Segger J-Link seems to be working fine.

I now have to work out why I'm getting a Hard Fault when calling a delay function in the Initialisation.

View solution in original post

0 Kudos
Reply
2 Replies
1,327 Views
GeoffF
Contributor II

I've managed to get the debugger working.  Basically, this morning after starting my PC I rebuilt the bootloader for the correct architecture and loaded that using FlashMagic.  Now my Segger J-Link seems to be working fine.

I now have to work out why I'm getting a Hard Fault when calling a delay function in the Initialisation.

0 Kudos
Reply
1,335 Views
GeoffF
Contributor II

I should add that I've downloaded AN11335, which details the differences between the parts.  It's possibly the FPU code that's breaking the 1788 version.

0 Kudos
Reply