MC1322x + SMAC + FreeRTOS + Eclipse + GNU

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MC1322x + SMAC + FreeRTOS + Eclipse + GNU

2,206 Views
jeffw
Contributor I

Hi,

 

Here is a link to a project that ports FreeRTOS to the MC1322x.  I started with a Generic App SMAC application and doctored it to fit a scheme more appropriate for mulitple boards and multiple IDE types.

 

http://www.gadgetworks.com/?q=node/3 

 

This archive contains two projects: an IAR project that runs, builds and debugs, and an Eclipse IDE project that almost builds.  More info on this Eclipse effort through the link - tho'  this is not an IAR integration of Eclipse, but rather a use of the GNU-ARM toolchain.  This will expand our dev and debug platform choices to include FreeBSD, Linux, and MacOS X.

 

Jeff

Labels (1)
0 Kudos
3 Replies

367 Views
sharning
Contributor I

Hi Jeff,

I have tried your port, and it works OK for the led flash demo, but when i tried to make tasks delay it crashed. After a bit of debugging, I discovered your fixed up IRQ stack routine was being executed in the SWI handler, which wwas not being handled by the ROM IRQ handler. Either you need to do both by ROM, or run the non fixed context switch on the SWI routine. I did this and it worked fine. I tried another approach that might be easier to maintain and understand - for the IRQ handler I wrote this simple code in portasm.s79:

 

vIrqHandler:
 PUSH {R0}
 LDR R0, vIrqTimerPtr ;get pointer to Timer Status_Control
 LDRH R0, [R0, #+0]  ;read Status_Control
 TST R0, #0x8000  ;see if TCF set
 POP {R0}   ;finished with temp register
 BEQ  IrqHandler  ;process non RTOS Timer Interrupt

#if configUSE_PREEMPTION == 1
 B vPortPreemptiveTickEntry
#else
 B vPortNonPreemptiveTick
#endif

vIrqTimerPtr:
 DC32 0x8000700e + (0 * 0x20) ;pointer to timer SCTRL register #0

 

This simple code check our RTOS timer first, if expired process as per standard FreeRTOS ports, otherwise just runs the ROM IRQ handler for the other interrupts. This has the advantage of reduced latency and leaves the bulk of port.C as per LPC2000 demo. It is also independant of ROM versions too. This method would also work well for UCOS-II etc etc.

 

Regards,

Dean.

0 Kudos

367 Views
esk021
Contributor I
Hi, I tried this project, loaded into SRB, and it doesn't work. Any "tips" for using it?.
0 Kudos

367 Views
redbee
Contributor III

As an alternative, you might give this project a try:

 

   http://mc1322x.devl.org

 

 

 

0 Kudos