What is required to start ARM projects in CB other than the toolchain ? I've installed this toolchain https://launchpad.net/gcc-arm-embedded (https://launchpad.net/gcc-arm-embedded), configured the toolchain executable inside CB and I still could not choose a compiler when creating an ARM project.
Which compiler have you edited in the settings?
GNU Compiler for ARM. Btw it could not auto-detect the compiler toolchain.
Do you see the GNU ARM GCC Compiler in the wizard's drop down?
If you see it and you can hit next then this will be the selected compiler for your new project.
No compiler appears on the ARM project wizard.
I can confirm that on win7. It's because a typo in the script 'share\CodeBlocks\templates\wizard\arm\wizard.script' at line 25:
Wizard.AddCompilerPage(_T(""), _T("armelf*"), false, false);
It should be:
Wizard.AddCompilerPage(_T(""), _T("arm*"), false, true);
to find the compiler and to allow for target options.
scarphin, yes you're correct I'm using this patch:
diff --git a/src/plugins/scriptedwizard/resources/arm/wizard.script b/src/plugins/scriptedwizard/resources/arm/wizard.script
index 184a544..4f4ec83 100644
--- a/src/plugins/scriptedwizard/resources/arm/wizard.script
+++ b/src/plugins/scriptedwizard/resources/arm/wizard.script
@@ -1,5 +1,5 @@
board <- 1;
-derivative <- 1;
+derivative <- 0;
outputvariant <- 1;
function BeginWizard()
{
@@ -22,7 +22,7 @@ function BeginWizard()
// select project name and path
Wizard.AddProjectPathPage();
// select compiler and configurations
- Wizard.AddCompilerPage(_T(""), _T("armelf*"), false, false);
+ Wizard.AddCompilerPage(_T(""), _T("arm-elf*"), false, false);
// select language
Wizard.AddGenericSingleChoiceListPage(_T("ARMBoards"), _T("Please select your ARM evaluation board."), ARM_boards , board);
Would this work on windows?
I think it's safer to go with 'arm*' instead of 'arm-elf*' because in '\share\CodeBlocks\templates\wizard\common_functions.script' every arm related compiler is marked with 'arm*'. Although 'arm*' will match with 'arm-elf', I don't think there is any reason to introduce inconsistency between the wizard and the scripts nor rename available arm compilers to 'arm-elf*'. For a matter of fact arm-eabi compilers (i.e. for raspberry pi) can be used with cb too. Using 'arm-elf*' works btw.
It worked on windows, but I get a message next to the windows clock it says can't find compiler executables. I will check this, meanwhile how to add ARM boards to the IDE ?
Quote from: Abdalla on March 14, 2015, 01:29:33 PM
meanwhile how to add ARM boards to the IDE ?
You have to modify the wizard script: 'path_to_cb_installation\share\CodeBlocks\templates\wizard\arm\wizard.script'
Or right click on the 'ARM Project' icon in 'file->new->project' and click 'edit this script' to use a modified version without affecting the original.
scarphin:
I can see that there is also iararm compiler, that won't be matched by the arm* or arm-elf*.
Do you know if this compiler will be supported by the wizard if it is enabled?
I don't know for sure but a quick look at the script tells me iar won't work as they have different compiler and linker options. One needs to test to be sure but it's highly unlikely imo.
OK.
Btw what is arm-eabi, simple search doesn't find anything in cb's sources about it.
I guess that the same compiler definitions are used for arm-eabi and arm-efl.
'eabi' is an API type.
https://wiki.debian.org/ArmEabiPort (https://wiki.debian.org/ArmEabiPort)
I don't know why you are looking for 'arm-eabi' in cb sources, it's the type of the compiler producing 'eabi' compatible output.
Because arm-elf* and arm* are compiler ids in the CBs terms, they have nothing to do with compiler executables.
Well, I'm aware of what they are but in case there's a confusion with how 'arm-eabi' works, I just duplicated the arm-gcc compiler and made the necessary changes in terms of executables if I recall correctly.
So if I'm correct arm-elf* should match both of your compilers. Is this the case?
Yes, but I can't be sure if I changed anything in the compiler settings, I may have. However I realized that the wizard is targeted for some embedded boards. The ones I checked are evaluation boards with no OS. arm-eabi compiler will need an OS to interact with making the wizard not appropriate for it so go ahead with arm-elf. I think a new wizard for arm-eabi will be more suitable in this case if need be.