Author Topic: How to install the GNU ARM compiler toolchain for codeblocks?  (Read 927 times)

Offline BlueHazzard

  • Lives here!
  • ****
  • Posts: 1919
Re: How to install the GNU ARM compiler toolchain for codeblocks?
« Reply #15 on: August 04, 2018, 05:07:22 pm »
kindly tell me the procedure ,how did you made this project,i guess it is made using Cubemx ,but in my cubemx version,codeblocks ide is not listed 

Thanks ;D

He likely started from an empty Code::Blocks project and then add code and settings till it built correctly.

Tim S.

exactly this was what i did... Inspect the makefile and make a codeblocks project from it.

CubeMX supports the export of ide independent files (the gpdsc export) and i have written a plugin that can import this files into codeblocks. Because with the project i posted at the top, if you change something in cube you have to change this manually in codeblocks project, and the include structure of the st stuff is TERRIBLE to say it kindly, and so you have way to much work to do... With the plugin this would be automatic...
Sadly the cube generated gpdsc file is by far not complete, and nearly useless, because many source files are missing (the whole cmsi thing for example) My import tool is finished and i plan to open source it on github as soon as the cleanup is done.

This tool is part of my embedded plan for codeblocks:
1) Import of gpdsc files (should work, but cube mx has bugs, i will try to find some time and ask in the st forum what the problem is....)
2) SVD file support for the debugger (plugin complete and works: But the current c::b is missing some features and i am waiting for feedback from the c::b devs to implement it in the debugger sdk.. see and
3) Better support for the SEGGER debugger platform (uploading code, reading flash, resetting uC ecc...) (i started the plugin and it kind of works, but there is some API missing in the codeblocks SDK and i have a discussion with the devs how to implement this .)
4) Probably some export plugin to use SEGGER ozon for debugging (but i am not happy with this, I would prefer to use codeblocks for debugging...)

Back to topic:
EDIT: i am using emwin for its >>static libraries  (STemWin532_CM0_GCC.a,STemWin532_CM3_GCC.a,STemWin532_CM4_GCC.a,STemWin532_CM7_GCC.a) as within these libraries only the source code of the GUI_Init() or other functions be available) . once the program which i am trying to write ,if successfully build with this libraries,then a smart screen will appear on my LCD?....

do you find any mistake in this approach?
1) You have to compiler the static libraries with the arm compiler and not with the mingw compiler!! (i don't know if you did that....)
2) i doubt that this is so easy.... Only way to find out is try it...
3) Can't you add the source code of emWin to the codeblocks project and let compile everything from source, so the compiler and linker can optimize more? As far as i have read in the emWin docs this should be possible (i have read maybe 10 pages....)

i want to ask,the project you provided is working perfect and building,if it is building definitely it is using the arm-none-eabi compiler,How did the project itself is  detecting the compiler present in the windows while building the code even though its executable are not provided in the setting of its path manually(right now by me,i have just clicked on the C:B project and pressed build that is it).
this really is a flaw in codeblocks and some time ago i tried to fix this by printing the used executables with full path....
You can look what compiler is set at the top of Project->Build options
And then you look at the path settings in the compiler settings under the above compiler...


Offline aashishgogna92

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: How to install the GNU ARM compiler toolchain for codeblocks?
« Reply #16 on: August 06, 2018, 06:45:29 am »
thanks, i am trying to understand all the aspects(codeblocks+debugging settings[manual pre-post build commands/enabling GDB CDB debugger/j-Link/etc ..)  , i will post the result once i succeed.

Thank you Sir, for the information!
« Last Edit: August 06, 2018, 06:47:19 am by aashishgogna92 »