AVR32 UC3 Port usable for AP7000?

bri1234 wrote on Wednesday, April 15, 2009:

Does the AVR32 UC3 port work for a AVR32 AP7000 processor? If not can someone explain why it does not work?
I know there is a port for the AVR32 AP7000 (ap7x-freertos) but the port is not supported officially. Also the interrupt handling of the UC3 port looks more "professional" to me.

rtel wrote on Wednesday, April 15, 2009:

I have never looked at the AP7000 but I would guess as somebody started a new port for that processor then the two would not be compatible.


bri1234 wrote on Friday, April 17, 2009:

The development of the unofficial AP7000 port started one year before Atmel added the UC3 port to the FreeRTOS project.
I take a look at the sourcecode and I found a comment in the file exceptions.S that it supports the UC3 devices only. The other files in the directory "portable" can be used for all AVR32 devices. So I think it should be not too complicated to get FreeRTOS running on the AP7000 with the official UC3 port. I will give it a try.

jesperv wrote on Monday, April 27, 2009:

Hi Bri

I’m also looking fo a working port for the AVR32AP7000. How is it working out?

Regards Jesper

bri1234 wrote on Sunday, May 03, 2009:

Hi Jesper,
there are only minor problems (e.g. renaming some variables) to compile the UC3 port for a AP7000. But unfortunately the RTOS crashes after starting the scheduler (vTaskStartScheduler). I tracked down the problem to the context switch code in the file "portmacro.h". Some assembler instructions used in the code work different on the UC3 and the AP7000 processor: SCALL, RETS and RETE. On the UC3 the instructions save the state of some registers to the stack automaticially. The AP7000 uses shadow registers instead.

I am not very familiar with the AVR32 because I started programming the AVR32 three weeks ago. Therefore it might take some days to get it running. It would be nice if you could help me.

jesperv wrote on Monday, May 04, 2009:

I’m also new to the avr32 programming but maybe you could look at the ap7x-freertos project and see how they implemented the context switch.

Can you provide the updated header files so i can try compiling the port?

Regards Jesper

bri1234 wrote on Tuesday, May 05, 2009:

Hi Jesper,
finally I got the FreeRTOS running on the AVR32 AP7000. Major changes in the file "portmacro.h" were needed. Espacially the context store/restore macros had to be modified. I will add my port to the FreeRTOS project within the next few days so you can checkout my changes for your project.

best regards, Torsten

jesperv wrote on Wednesday, May 06, 2009:

Hi Torsten

That’s great news. It would be nice if you could send the code to my email so i can start testing it right away. My email address is jesperv (at) es dot aau dot dk

I have been trying to port the ap7x-freertos to my ICnova ap7000 Base / Grasshopper but it would be better to use your contributions.

Best regards Jesper

bri1234 wrote on Thursday, May 07, 2009:

Hi Jesper,
I use the Grasshopper Board too. Hence you should be able to use my sourcecode without any modifications. I asked Richard Barry about the procedure to add my sourcecode to the project but I did not get a response till now. So I will send it to you by mail.

Best regards, Torsten