8 years ago.

Ubuntu 16.04 CodeBlocks setup

Hello,

I'm really new to this programming thing and I like it but I am growing desperately frustrated. Seeking through the internet and the Adam Green gcc4mbed github code, I can't seem to get offline coding in codeblocks to work:

-CodeBlocks randomly seizes, after which I need a kill -9 <pid> to be able to restart. -If I want to start an ARM project, I get stuck in a wizard that forces me to use a certain development board. But my LPC1768 isn't one of them -I nistalled the gcc-arm-enmbedded toolchain, but when I select compiler GCC for ARM, Codeblocks can't find the compiler.

I know these may be very basic questions but I'm at a loss.

Regards, Marout

What about eclipse or similar IDE? Codeblocks is not supported by default by our exporters, so you have to create your own project. I would try existing exporters or create an eclipse (there are some guides how to do it)

posted by Martin Kojtal 02 May 2016

2 Answers

8 years ago.

Why choose a difficult way , I use a offline compiler since years, with ubuntu. This is the solution:
1. start your project with the online compiler
2. export this to gcc-arm: you get a zip file with the whole offline project
3.install the gcc-arm compiler https://launchpad.net/gcc-arm-embedded (this link is avalable in the mbed documentation)
4.in the makefile, change the path to your compiler. Look at google for the syntax of a makefile
4.use your prefered editor and the commands make , make clean ...

There is no problem with the 1768. With stm32xx some of of the firmware is provided for Windows only !
Try this and ask if you need more info.

Accepted Answer

I was doing this, but -my CodeBlocks keeps crashing randomly -When I start a project in Codeblocks, it asks me what ARM development platform I use. LPC21xx is the only LPC mentioned... -Every installation manual tells me to get latest GCC-ARM-EMBEDDED compiler. I can choose gcc-arm-none-eabi which is 4.9.3 released Q4-2015 or gcc-arm-embedded which is 5.3 and released 5-2016 (comes as an ubuntu xenial package via their PPA repository). However, on the launchpad site, team-gcc-arm-embedded report this 5-2016 release to be _superceded_ by the Q4-2015 release even though version is _lower_. Eclipse installation yells _do not use distro-related gcc packages_.... I'm slowly loosing my mind over this....

So, yes I will try again by exporting my project and mybe re-uploading for final debugging/compiling.

But there must be a working offline way.

I know th

Meanwhile I have

posted by Marout Yasuo Sluijter-Borms 03 May 2016

For the moment I use gcc-arm-none-eabi-4_9-2015q3 with Xubuntu 14.04 and the makefile provided by the exporter.

posted by Robert Spilleboudt 03 May 2016
8 years ago.

I don't have any specific answers for you. But I feel your pain. I can tell you that I am successfully using the mbed framework offline. I am using an ST Nucleo board and their SW4 System Workbench. The exported project from mbed online compiler more or less worked out of the box. The mbed interface chip also works as an ST Link V2 programmer and debugger and I can program and debug the chip inside SW4 program or use the ST Link Utility to flash the main target micro. This is on Windows. I did try it on Ubuntu for a bit and it kind of worked. Had a problem with the usb virtual serial port driver not working (for the debug printf messages), but I didn't spend a whole lot of time trying to fix it.

Getting the whole environment setup properly is pretty tricky, so you probably want to look for a canned solution where someone has done the work already. I would note that I am seeing Emblocks as an export from mbed online rather than CodeBlocks. I believe they are different. I was going to ask if you had tried Emblocks/Embitz but I note that seems to be windows only.

Maybe try NXP's LPCXpresso? Seems to run on Linux and there is an mbed export option for it.