OpenOCD LPC4078

I’m trying to use openocd with LPC4078 without success since I can’t find the right script file. I tried to use the script for lpc1768 but then I’m unable to write the flash. I’m using st-link/V2 as interface.

The parameter for launching openocd are:

-f /interface/stlink-v2.cfg -c "transport select hla_swd" -f /target/lpc17xx.cfg

With those parameters openocd connects correctly to the board but when I try to write the flash I get the following error message:

BUG: unknown Part ID encountered: 0x47193f47 

Which makes sense since I specified lpc1768 and the cpu is lpc4078, but I can’t find the right script. The error message comes from lpc2000.c source file, in this file there’s no mention to lpc4000 familly flash. Should i use another flash memory driver?

Is there anybody out there which made it working with the “openocd ↔ st-link ↔ lpc4078” combination?

Thanks.

Hi,ravaz.

LPC407x/8x should work same cfg by LPC177x/8x,but lack of support flash auto detection

for LPC407x/8x on current commit.I will commit auto detection for LPC407x/8x devices.

For the time,you can use attached file for lpc4078/88 special cfg instead of lpc17xx.cfg.

(This cfg file work with OpenOCD0.9.0-dev latest commit)

It can be same usage like lpc17xx:

-f interface/stlink-v2.cfg -c "transport select hla_swd" -f target/lpc4088_flash.cfg

For example,to flash “main.elf”,you can execute procedure call.

-f interface/stlink-v2.cfg -c "transport select hla_swd" -f target/lpc4088_flash.cfg -c "mt_flash main.elf"

Best regards.

Nemui Trinomius.

Dear all,

Recently merged auto-detection fix.

http://openocd.zylin.com/gitweb?p=openo … 327a33c4fb

Plz try this.

Best regards,

Nemui Trinomius.