Author Topic: uTasker running in ARM mode  (Read 9570 times)

Offline David0253

  • Newbie
  • *
  • Posts: 2
    • View Profile
uTasker running in ARM mode
« on: September 04, 2009, 11:15:08 AM »
I am currently evaluating uTasker to see if I can merge it with our existing project code to add Ethernet functionality. Our existing Rowley project works in ARM mode not Thumb mode. Can anyone confirm that when uTasker is compiled in ARM mode will it run ok? I don't want to spend too long chasing ARM/THUMB bugs or try to do the port/merge if it will not work in ARM

Thanks.

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3236
    • View Profile
    • uTasker
Re: uTasker running in ARM mode
« Reply #1 on: September 04, 2009, 12:19:45 PM »
Hi

The uTasker project concentrates on small footprint operation and so Thumb mode is the setting that it is designed for.

As long as inter-working is enabled ARM and THUMB modes are fully compatible (some files can be compiled in ARM mode, others in Thumb, and individual routines can also be specified to be compiled in Thumb or ARM mode).

In some ARM targets there is one piece of code which is written for thumb mode operation - this is the FLASH manipulation code (erase, write) which runs from SRAM (it needs to be configured to an uneven address in SRAM to cause the Thumb mode to be used. However in the LPC2XXX project this technique is not needed since the chip has in-build IAP support.

It should thus be possible to compile the complete LPC2XXX project in Thumb or ARM mode, or mix as required. This 'should' be a purely compiler thing.

Regards

Mark

Note that interrupts always run in ARM mode. There are different techniques used for vectoring interrupts, meaning that - depending on whether the interrupt code is called directly or whether it is called via an interrupt dispatcher - the interrupt routine may be automatically forced to ARM mode (the programmer won't notice this since it is automated by the irq attribute). GCC tends to use an interrupt dispatcher since not all versions correctly support vectored interrupts, but IAR and co. will tend to use direct vectoring (forced ARM). This may change, depending on GCC progress and exact target, but is generally transparent to the programmer.

Offline David0253

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: uTasker running in ARM mode
« Reply #2 on: September 04, 2009, 01:35:30 PM »
Mark

Thanks for your reply. From past experiences with ARM compilers the code written for one mode has not always worked 100% in the other. Before I start on this venture I was just seeing if anybody had compiled uTasker in ARM mode instead of THUMB. I just need to dive in and do it I guess.

Thanks.