Another Getting Started Thread

Hello!

Thanks for all the help with choosing hardware and software. I’ve received the Blueboard LPC1768-H, and I intend to use Eclipse + Yagarto (no debugging yet). Unfortunately, I’ve already encountered a problem I can’t understand! I’ve Googled, but I’m still completely confused. First, here’s the problem:

**** Build of configuration Default for project starter ****

make all

arm-none-eabi-g++ -O2 -gdwarf-2 -mcpu=cortex-m3 -mthumb -mthumb-interwork -mlong-calls -ffunction-sections -fdata-sections -fpromote-loop-indices -Wall -Wextra -Wimplicit -Wcast-align -Wpointer-arith -Wredundant-decls -Wshadow -Wcast-qual -Wcast-align -fno-rtti -fno-exceptions -I./ -Iinc/delay -Iinc/mini_cpp -Iinc/syscalls -Icore/cm3/ -I. -c main.cpp -o main.o

cc1plus.exe: warning: command line option ‘-Wimplicit’ is valid for C/ObjC but not for C++ [enabled by default]

cc1plus.exe: error: unrecognized command line option ‘-fpromote-loop-indices’

make: *** [main.o] Error 1

More Info:

I get this in the “Console” tab in Eclipse. For installation, I followed instructions found in these links:

http://www.yagarto.de/howto/yagarto2/index.html and

http://msys-mv.blogspot.com/2010/10/sof … -with.html

I followed the instructions as closely as I can, and installed Yagarto instead of CodeSourcery’s G++ Lite. In short, I installed Yagarto Tools and Yagarto Toolchain → For Eclipse, I extracted it (it’s the 64 bit version), updated it, installed CDT as per instructions (plus a plugin called CDT Cross ARM GNU). I then started a project and imported files found here: http://cortex-m3-tutorials.googlecode.c … ar2011.rar, and selected GNU ELF Parser as the Binary Parser.

Everything seemed fine. I hit CTRL+B (to build all), and there are no errors. However, the moment I change something in main.cpp, I get the error above. All I’m trying to do is get the project to build with my own code!

Can anyone shed some light on this? Thank you!

Hello again!

After my post yesterday, I decided to mess around with the makefile, which I thought was the source of the problem. After all, this was meant to be used with CodeSourcery’s G++ Lite instead of Yagarto. I made the following changes:

  1. Removed #-fpromote-loop-indices -Wimplicit from GPFLAGS

  2. Changed REMOVE = cs-rm -f to REMOVE = -rm -f

  3. Commented out both $(REMOVE) $(OBJECTS) under clean

  4. Added $(REMOVE) $(PROJECT).o

And now things seem to build. I haven’t tested if it’s really properly built, but at least there aren’t any errors. Oddly, I had to make the third change because something didn’t like core_cm3.o removed. I’m not sure what’s going on, but I thought

.c.o :
	$(GCC) $(GCFLAGS) -c $< -o $(<:.c=.o)

would have automatically recreate core_cm3.o. But apparently that’s not the case.

Does anybody know what’s going on? Thank you!

editing makefiles is so 20th century

:o

Hahah is that so? How’re things done in the 21st century then?

Have got it to work?

Yes! Made a few changes to the makefile and got it to work. Also experienced some problems with interrupt handlers and I was advised to use ‘extern “C”’ before declaring the handler and everything works now.

I’ve been meaning to get it to print stuff as a virtual com port since I don’t have a JTAG debugger but sadly I’ve been occupied with my quadrotor project!

rmteo1:

SodaAnt:
…If it extends to $210, I highly recommend the non-profit editions of Rowley CrossWorks ($150) and the Segger J-Link EDU ($60). This combination is plug and play and Rowley offers tech support, if you need it.

Best advice ever - you can be off and running in just a few hours. In fact you can get started for almost nothing using the free 30-day trial of Crossworks. Throw in another <$12 (for the ST VLDiscovery) and you've got a debugger/programmer (fullly supported by CrossWorks) and a development board with a Cortex-M3, 128k FLASH, 16k RAM, 12-bit DAC, RTC with 32KHz crystal, 64-pin TQFP with every pin broken out to 0.1in. headers, etc.
I know this thread is going dormant, but I'll add another plug for Crossworks and for J-Link. I struggled with OpenOCD and an Olimex JTAG for too long before going back to Crossworks (I had used it before) and getting a J-Link. Wow, it just works!

Two other benefits of Crossworks are (a) the ease of managing configurations and properties, and (b) the tasking library which lets you get multi-tasking code up and running in a snap.

And I’ve got a couple of those STM32 Discovery boards in the mail - time to start learning Cortex M3 and try out ST’s stuff.

The STM32 Discovery board (fully supported by CrossWorks) works great as a debugger/programmer for one of these.

http://i744.photobucket.com/albums/xx86 … 281175.jpg

For $45 shipped at the auction site, you get this (STM32F103VCT6 256K Flash, 48K RAM), development board with:

Ө. 3.2" TFT LCD Module, 320 * 240 resolution, 26 million color.

Ө. Resistive touch screen, with RSM1843 Controller.

Ө. 4 LED light, 2 LED indicatorӨ.

Ө. Two GPIO buttons

Ө. A RESET Button

Ө. Serial communication interface (USB-Serial bridge)

Ө. 2 mini-type USB socket, support for USB OTG

Ө. 1 Micro SD card connector (without SD card)

Ө. USB OTG function, support for external USB

Ө. A JTAG / SWD debug interface (20pin)

Ө. RTC battery

Ө. USB Power Supply

Ө. All IO extended out for development

This thread is really dormant now, but after some time with my Blue Board LPC1768-H with Eclipse+Yagarto+secondary bootloader, I have to say I’m experiencing a truckload of problems.I managed to get code to compile without much understanding behind the makefile, but there’s a really huge learning curve getting into this. Only managed to get a systick blinky working so far.

I haven’t been able to get to the next step having the thing output text either via uart or USBcdc and things are getting annoying! The code simply wouldn’t compile, or compile but wouldn’t run (not even the blinky once I throw in the usbcdc library). I might eventually jump to the recommended CrossWorks, but for now I’ll try to hang on and find the dang problem without pulling all my hair out!

Of course, it’ll be lovely if there’s anyone looing for a challenge (or maybe its not even a challenge. I have no idea.)