I'm starting this thread to hopefully encourage a discussion about Feature Request #305 - Adding Assembly Compile Options to the build settings.
In the comments for this feature request, Eran has made good argument for why this feature has not yet been implemented. I agree with this premise, but I also believe that there is a good case for it, and I'll attempt to articulate that here.
The rise of embedded computers. The desktop is playing less of a role than it did 10 years ago. I don't think the desktop is dead, or even dying, but I think many of the things we used to use desktops for are now being done on embedded computers. Case in point: notice the rise in popularity of devices like Arduino, BeagleBone, Raspberry Pi, and now Intel's Minnow. I know these run Linux and are not "Bare Metal", but those who wish to build devices like these (Like me) must do "Bare Metal" programming. There isn't a great open source IDE for this Bare Metal programming. CodeLite and Code::Blocks are really the best, and I prefer CodeLite (Hail! to the developers). I understand that CodeLite may not have been intended for embedded development, but CodeLite is actually a pretty darn good tool for this kind of programming.
I acknowledge that it is not necessary to use assembly to program embedded devices, but many libraries written by the ARM, STM, TI, and other MCU manufacturers release assembly files that are necessary to boot and initialize the MCU. Also, ARM has also made special instructions for the processors (e.g. SIMD instructions) that can only be used from assembly. Granted, these features are usable from inline assembly also, but sometimes it's more elegant to use an assembly file, and assembly files sometime contain syntax that can't be done in inline assembly (at least that I'm aware of).
I think there are likely other programming disciplines that may use assembly as well, and I hope others can point them out.
In CodeLite's "Syntax Highlight and Fonts" options, there is a category for "Assembly" but there is no toolchain integration for assembly files, which seems inconsistent IMO. Futhermore, the assembler is part of the GCC toolchain, and often part of other toolchains as well. It would be nice to have CodeLite make the integration with this part of the toolchain more intuitive and "natural".
If I had the skills, I'd submit a patch myself, but I don't I hope others will contribute their thoughts and the developers will give this feature their thoughtful consideration.
Thanks.
Feature Request #305 - Add Assembly Compile Options
-
- CodeLite Enthusiast
- Posts: 46
- Joined: Sat Jan 19, 2013 10:31 am
- Genuine User: Yes
- IDE Question: C++
- Contact:
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Feature Request #305 - Add Assembly Compile Options
You can help by providing instructions (detailed ones) of what is missing.Verax wrote:If I had the skills, I'd submit a patch myself, but I don't I hope others will contribute their thoughts and the developers will give this feature their thoughtful consideration.
For me sentences like "there is no toolchain integration for assembly files" is vague, I would like to get a detailed list of what is missing.
For example:
- Do we require a specific assembler compiler entry (as.exe?) in the toolchain tab?
- Do we need a specific compilation line (settings -> build settings -> compilers ->gnu g++ -> File Types)
If you could answer these questions and provide some more info, we could start adding support, but I need some guidance to make it happen
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Enthusiast
- Posts: 46
- Joined: Sat Jan 19, 2013 10:31 am
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Feature Request #305 - Add Assembly Compile Options
I'll be happy to do whatever I can to helpYou can help by providing instructions (detailed ones) of what is missing.
Here's how I think it should be done:
1) Add a new textbox to the "Settings"->"Build Settings"->"Compilers" tab titled "Assembler Name:" and place it between "C Compiler Name:" and "Linker Name:". The text box should default to the following values for each of the default compilers:
- VC++: "" --I think this should be "masm", but I'd just leave it blank for now. Perhaps someone more familiar with VC++ can submit a suggestion
corba: ""
gnu g++: "as"
gnu gcc: "as"
- gnu g++:
gnu gcc:- Extension: "s"
Kind: "source"
Compilation Line: $(AS) $(SourceSwitch) "$(FileFullPath)" $(ASFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/$(ObjectName)$(ObjectSuffix) -I $(IncludePath)
- Just leave it the way it is. Perhaps someone more familiar with VC++ can provide a command line format.
- Just leave it the way it is
- Extension: "s"
I hope that is enough information to at least elicit more details. Let me know if I can provide any more information.
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Feature Request #305 - Add Assembly Compile Options
Thank you, this should be more than enough to get me started
Eran
Eran
Make sure you have read the HOW TO POST thread
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Feature Request #305 - Add Assembly Compile Options
I have added assembler support in codelite - when you have the time, please test it
Eran
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Enthusiast
- Posts: 46
- Joined: Sat Jan 19, 2013 10:31 am
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Feature Request #305 - Add Assembly Compile Options
I finally figured out how to get CodeLite to build. For me, I had to rename some *.dlls to *.a. If you know how I can fix this please let me know.
I can see the new features on all of the relevant screens. Looks good, thanks.
However, upon compiling my project, it appears it is looking for "as" when my compiler settings say "arm-none-eabi-as ...". Here's the relevant output from the build.
Here are screenshots of my settings.
Let me know if/when there's a fix and I'll be happy to test again.
Mike
I can see the new features on all of the relevant screens. Looks good, thanks.
However, upon compiling my project, it appears it is looking for "as" when my compiler settings say "arm-none-eabi-as ...". Here's the relevant output from the build.
Code: Select all
as "C:/Users/Mike/Desktop/MyProject/libstm32periph/src/CMSIS/startup_stm32f4xx.S" -o ./Debug/CMSIS_startup_stm32f4xx.o -I-I. -I. -Iinclude/CMSIS -Iinclude/STM32F4xx_StdPeriph_Driver
'as' is not recognized as an internal or external command,
operable program or batch file.
Mike
You do not have the required permissions to view the files attached to this post.
-
- CodeLite Enthusiast
- Posts: 46
- Joined: Sat Jan 19, 2013 10:31 am
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Feature Request #305 - Add Assembly Compile Options
I double-checked my compiler selection. It look right to me.
You do not have the required permissions to view the files attached to this post.
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Feature Request #305 - Add Assembly Compile Options
Thanks for reporting this - fixed in git head
Eran
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Enthusiast
- Posts: 46
- Joined: Sat Jan 19, 2013 10:31 am
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Feature Request #305 - Add Assembly Compile Options
Works great! Thank you.