Page 1 of 1

Chibi makefile projects on Atollic 6.0.0

Posted: Mon Sep 05, 2016 5:09 am
by inca
Greetings,

I have been spending a lot of time in Atollic lately for reasons beyond my control, so I have tried a few different ways of getting ChibiOS to "just work" in the usual workflow. I had some trouble getting makefiles to work on windows (I am looking forward to Atollic's Mac OS release this year).

Similarly, porting the 9 ChibiOS makefiles to the eclipse managed build project does not seem to be possible in any sort of automated way. Porting the 9 makefiles to the managed build by hand is possible, though a tedious way to try things out.

tl;dr: here is the Atollic Eclipse Workspace with two STM32F4xx demo projects ported over to it. It includes the binary GNU tools and ChibiOS 16.1.5.

Assuming Atollic 6.0.0, here is the list of steps I took to get ChibiOS makefiles to build on windows 7:
  1. Download ChibiOS and expand it into C:\chibios
  2. Download/extract mingw msys gnutools from ChibiStudio into C:\chibios\gnutools (convenience package of gnutools folder)
  3. Add Atollic ARM tools (arm-atollic-eabi-*) bin path and the GNU make tools to the system PATH (Control Panel->System->Advanced system settings->Environment Variables...->System variables->PATH):
    • C:\Program Files (x86)\Atollic\TrueSTUDIO for ARM 6.0.0\ARMTools\bin;C:\chibios\gnutools\bin;
  4. Launch Atollic 6.0.0
  5. Select C:\chibios as the Workspace
  6. Select Window->Preferences, General->Workspace->Linked Resources
    • Ensure Enable linked resources is checked
    • New...
      • Name: CHIBIOS
      • Location: C:\chibios
  7. Import the C:\chibios\demos projects of interest per the usual Eclipse workflow
  8. Modify the main Makefile TRGT variable, line ~163, to read: TRGT = arm-atollic-eabi-

From there things should build to elf and the other binary targets specified.

For debugging, add a new configuration per the usual Eclipse workflow. Embedded C/C++ Application->Main->C/C++ Application:

Code: Select all

${project_loc}/build/ch.elf


Enjoy!

Edit: Added tl;dr line

Re: Chibi makefile projects on Atollic 6.0.0

Posted: Mon Sep 05, 2016 11:56 am
by Giovanni
Hi,

Thanks for the mini-guide, it is strange that they don't include the utilities into the base product.

Giovanni

Re: Chibi makefile projects on Atollic 6.0.0

Posted: Mon Sep 05, 2016 4:06 pm
by inca
Giovanni,

They do include some utilities with the Atollic package. However, they do not include all of the tools that ChibiOS makefiles use, such as `cat`.

Also, I have tested (and ported) the community USB Host code driver to the 16.1.5 ChibiOS-RT for STM32F407-DISCOVERY.
  • The CDC FTDI shell works.
  • The MSD fat fs write/read test also works.
It is also at the above github repository: https://github.com/jhgorse/chibios-atol ... x/USB_HOST

Let me know if that code belongs anywhere else.

Cheers