ARM-USB-TINY-H + SWD + LPC1114 (DIP28): Verify failed
I'm evaluating Crossworks for ARM v2.2 on Mac OS X, however, I can't figure out how to load a basic LED blinking program on the LPC1114.
The LPC1114, being a DIP28 package, is on a breadboard with a the most basic support components: a few caps for power smoothing, a LED for circuit power and one to blink, and a reset button. Nothing fancy. VCC is 3.3V from a bench power supply.
I have the Olimex ARM-USB-TINY-H and SWD adapter. I have SWCLK, SWDIO, and RESET connected correctly, I believe, as well as VREF and GND. I get the same result regardless of whether PIO1_4 is connected to VCC or GND (PIO1_4 is the "should I start in ISP mode?" pin).
I am selecting the Olimex ARM-USB-TINY adapter in the Crossworks UI (specifying SWD instead of JTAG) and loading a basic project that is correctly configured for a LPC1114 microcontroller. It can connect to the target and identify just fine.
However, whenever I try to download a trivial program, Crossworks warns me that verification failed. When I compare the expected versus received, it is the first few hundred bytes that are consistently different, the rest is the same.
I've tried playing with various debug target settings (Adaptive Clocking, Clock Divider, nTRST Open Drain, etc.) with no change in the result. I also tried a different LPC1114 chip, in case the one I was originally using was defective. I can program the chip with lpc21isp.
What foolish mistake am I making?
-
Hi Eric,
It sounds like the remapping of FLASH to address 0x0000000 is not occurring - this is done by the FLASHReset() function in the LPC11xx reset script.
How did you create the project?
Do you get the same behaviour if your use one of our sample projects (for example the projects in the IAR LPC1114 KickStart board support package).
Regards,
Jon
-
Jon,
Thanks for the help. I used the project "wizard", however, I selected LPC1114 instead of LPC1114/102 for the MCU model. I see the same result when I install the IAR LPC1114 KickStart package and load that.
if I build a trivial project and select LPC1114/102 as the MCU model, I get the following error when I select the FLASH Debug build setting and try to upload it: "Loader error: unknown target device."
If I select a RAM Debug or Release build setting and try to upload it, I get:
/Applications/CrossWorks for ARM 2.2/gcc/arm-unknown-eabi/bin/ld: error: .heap is too large to fit in RAM memory segment
/Applications/CrossWorks for ARM 2.2/gcc/arm-unknown-eabi/bin/ld: error: .stack is too large to fit in RAM memory segment
/Applications/CrossWorks for ARM 2.2/gcc/arm-unknown-eabi/bin/ld: error: .stack_process is too large to fit in RAM memory segment
/Applications/CrossWorks for ARM 2.2/gcc/arm-unknown-eabi/bin/ld: error: .vectors_ram is too large to fit in RAM memory segment
/Applications/CrossWorks for ARM 2.2/gcc/arm-unknown-eabi/bin/ld: error: .tbss is too large to fit in RAM memory segment
/Applications/CrossWorks for ARM 2.2/gcc/arm-unknown-eabi/bin/ld: error: .tdata is too large to fit in RAM memory segment
/Applications/CrossWorks for ARM 2.2/gcc/arm-unknown-eabi/bin/ld: error: .heap is too large to fit in RAM memory segment
/Applications/CrossWorks for ARM 2.2/gcc/arm-unknown-eabi/bin/ld: error: .stack is too large to fit in RAM memory segment
/Applications/CrossWorks for ARM 2.2/gcc/arm-unknown-eabi/bin/ld: error: .stack_process is too large to fit in RAM memory segment
/Applications/CrossWorks for ARM 2.2/gcc/arm-unknown-eabi/bin/ld: error: .vectors_ram is too large to fit in RAM memory segment
/Applications/CrossWorks for ARM 2.2/gcc/arm-unknown-eabi/bin/ld: error: .tbss is too large to fit in RAM memory segment
/Applications/CrossWorks for ARM 2.2/gcc/arm-unknown-eabi/bin/ld: error: .tdata is too large to fit in RAM memory segmentBuild failed
-Eric
-
Eric,
There are some newer LPC11xx devices, support for which didn't make it to last weeks LPC1000 CPU support package release. Can you try replacing the existing loader with the one attached to see if it solves the problem. To find the existing loader, click File > Open Directory In File Explorer > Open Targets Directory... and then look in the LPC1000/Release directory.
If that doesn't fix it, can you try running the program described at https://rowley.zendesk.com/entries/123298-lpc1114-with-swd-loader-error-unknown-target-device to get the part ID. As you are running on a small device you may need to disable printf/scanf support in order to get it to fit in RAM - to do this set Printf/Scanf Options > Printf Supported and Printf/Scanf Options > Scanf Supported project properties to "No".
Regards,
Jon
Please sign in to leave a comment.
Comments
4 comments