KidE:
i played around now with eclipse and somehow i find it more natural to work with so i think i’ll stick to that.
Really? I really loved Crossworks for ARM, but I wanted to have a go at getting Eclipse/yagarto/OpenOCD working (and save $150 in the process), so I did. :mrgreen:
I tried to build your LED buzzer thing with LPC210x.h but that is giving some problems which i have to dig into.
Why don't we get on the same page here. Grab "my" (not really mine - I downloaded it from somewhere) [[LPC214x header file](http://ghmicro.com/images/junk/LPC214x.rar). It has worked just fine since I started out.
If I want to test my code in eclipse to see if i written it correctly. Normally this would be done by debug but debug also writes the code directly to the chip. Is there a way to debug it without directly writing the code?
I think there's a simulator mode, but I really am not sure. I almost never use sims because, really what's the point if you have the chip sitting right there :roll:, so I just didn't care to look into it. If you find one and figure out how to use it, tell me! :mrgreen:
Or maybe you mean to debug the same code without writing it to the chip again, maybe in a second session or something? Yes, you can do that too. Just do a debug with the usual init script
target remote localhost:3333
monitor arm7_9 force_hw_bkpts enable
monitor reset
#set MEMMAP to User Flash Mode
monitor mww 0xE01FC040 0x0001
monitor flash write_image erase c:/gccfd/projects/rtc_clock/rtc_clock.bin
break main
monitor soft_reset_halt
continue
but leave out (or comment out) the “flash write_image” line.
You talked about the bootloader a few post back. Is it normal that you always use the bootloader or are there also different ways to use this chip?
The built-in bootloader is for loading your code through the RS232 port. I rarely do that. I'm too impatient, and I need debugging, so JTAG it is. You can also add a [[USB bootloader](http://www.sparkfun.com/commerce/tutorial_info.php?tutorials_id=94) and use that. Again, no debugging - only very fast program loading.
But you have a JTAG dongle. Why would you even care about bootloaders? JTAG is fast and does debugging. Best of both worlds.
Is there a way to debug the chip to see what it is doing or going wrong in some points. I figure this is what JTAG is for but how do you see these messages.
Yes, that's what JTAG is for. If you aren't using it for debugging then using JTAG is kinda pointless.
If you’re using Eclipse and yagarto (or other GCC toolchain) just dig thru the docs for gdb documentation. Eclipse has a few icons for simple single-stepping and other very basic debug commands, as well as register & variable and memory views, but to really use gdb you need to know and type in the commands. Make a cheat sheet - there’s a lot of them.
You’ll find Eclipse debugging very flaky and buggy compared to Crossworks. But once you get used to it it’s not so bad. You just have to learn where the bugs and weirdnesses are and work around them.
Guess I should make a Eclipse/yagarto/OpenOCD debugging beginner page on my site one of these days…
I read something about UART logging am i right?
I have no idea what UART logging is. Never heard of it.
On http://jcwren.com i found an enormous bunch of demo code for my board so this give me together with your stuff a bunch of work for the next year.
Ya, that's a nice collection. I downloaded it all, but haven't looked at it yet. I prefer to figure it out on my own if possible. Sticks better that way. :mrgreen:
I currently have the RTC doing a clock on my LCD. It’s still in the rough stages. When I get a bit further along I’ll post the article on my site. The RTC is ultra simple to use without interrupts. With interrupts it becomes slightly less simple but much more useful. That’s next for me. Polling just isn’t going to cut it for this project.](http://www.sparkfun.com/commerce/tutorial_info.php?tutorials_id=94)](http://ghmicro.com/images/junk/LPC214x.rar)