Author Topic: Mixed ARM/THUMB code within Code::Blocks project  (Read 14716 times)

tilmannreh

  • Guest
Mixed ARM/THUMB code within Code::Blocks project
« on: July 18, 2009, 09:02:40 am »
Hello,

I am developing an application with the LPC2138 (ARM7) controller. I have set up Code::Blocks with the arm-elf-gcc toolchain and so far, everything works fine.

To reduce code size and download times, I would like to use THUMB code for most of the application. However, the interrupt service routines must stay ARM code. GCC does not allow switching the compiler mode by function, but only by file. For that, it uses command line options (-mthumb resp. -marm in this case).

Is there an easy way to make Code::Blocks apply a compiler command line option for particular source files, but not generally?
(Or to use different sets of command line options for different sets of source files?)

Thanks for hints,
Tilmann

Offline wses

  • Single posting newcomer
  • *
  • Posts: 2
Re: Mixed ARM/THUMB code within Code::Blocks project
« Reply #1 on: April 26, 2010, 04:23:21 pm »
 HiTilmann, how did you configurate the Code::Blocks to work with arm, whats toolchain are you using?
I'm trying but i canĀ“t configurate it until now.