rtosdemo does not work with mega128

After having tried the demo application with ATmega16 running at 8MHz with reduced scope, i am now trying to run it on a ATmega128 running at 16MHz. But it doesn not work. I have also written my own application using the ATmega16 and it works as expected but again does not with the mega128. Here are the only changes that i have made for using with the mega128 In the makefile # MCU name MCU = atmega128 and in FreeRTOSConfig.h #define configCPU_CLOCK_HZ            ( ( unsigned portLONG ) 16000000 ) #define configTOTAL_HEAP_SIZE        ( (size_t ) ( 2500 ) ) Are there any more changes to be made? To debug in vmlab, i tried to generate coff file but i get the following error Kishore@2[AVR_ATMega323_WinAVR]$ make coff Converting to AVR COFF: rtosdemo.cof avr-objcopy –debugging –change-section-address .data-0x800000 –change-section-address .bss-0x800000 –change-section-address .noinit-0x800000 –change-section-address .eeprom-0x810000  -O coff-avr rtosdemo.elf rtosdemo.cof avr-objcopy: rtosdemo.cof: Invalid bfd target avr-objcopy: –change-section-vma .eeprom+0xff7f0000 never used avr-objcopy: –change-section-lma .eeprom+0xff7f0000 never used avr-objcopy: –change-section-vma .noinit+0xff800000 never used avr-objcopy: –change-section-lma .noinit+0xff800000 never used avr-objcopy: –change-section-vma .bss+0xff800000 never used avr-objcopy: –change-section-lma .bss+0xff800000 never used avr-objcopy: –change-section-vma .data+0xff800000 never used avr-objcopy: –change-section-lma .data+0xff800000 never used make: *** [coff] Error 1 Kishore@2[AVR_ATMega323_WinAVR]$ I don’t know how to interpret these errors. Can anyone help?

rtosdemo does not work with mega128

I though maybe that the larger constant for the CPU speed was causing an overflow in the generation of the timer constants, but having stepped through this in the simulator I can see that the use of the prescaler prevents this.  I cannot see why a 16MHz XTAL would cause a problem. As for the COFF output – I can generate usable coff files but so far am having trouble including debug info in the file.  Try ‘make extcoff’ as an alternative.

rtosdemo does not work with mega128

having declared the constants as long could there still be an overflow? I decided to compile the code for 8MHz and run the micro at 16. I would expect that everything runs twice as fast as was designed for. still the the leds connected to portb (I am only checking PB1) do not light up. I tried extcoff which gives me similar errors!? Kishore@2[AVR_ATMega323_WinAVR]$ make extcoff Converting to AVR Extended COFF: rtosdemo.cof avr-objcopy –debugging –change-section-address .data-0x800000 –change-section-address .bss-0x800000 –change-section-address .noinit-0x800000 –change-section-address .eeprom-0x810000  -O coff-ext-avr rtosdemo.elf rtosdemo.cof avr-objcopy: rtosdemo.cof: Invalid bfd target avr-objcopy: –change-section-vma .eeprom+0xff7f0000 never used avr-objcopy: –change-section-lma .eeprom+0xff7f0000 never used avr-objcopy: –change-section-vma .noinit+0xff800000 never used avr-objcopy: –change-section-lma .noinit+0xff800000 never used avr-objcopy: –change-section-vma .bss+0xff800000 never used avr-objcopy: –change-section-lma .bss+0xff800000 never used avr-objcopy: –change-section-vma .data+0xff800000 never used avr-objcopy: –change-section-lma .data+0xff800000 never used make: *** [extcoff] Error 1

rtosdemo does not work with mega128

Forgive the obvious nature of this question but sometimes they have to be asked.  Have you tried running the micro at 16MHz with a simple hello world type program to ensure the hardware is happy with 16MHz?

rtosdemo does not work with mega128

I did the opposite – compile the code for 16 but run the processor at 8 (I don’t have a 16MHz xtal).  The code ran fine and half the rate was would be expected.  I think this proves that the constants are calculated correctly. Struggling to think of what could be wrong.  I can get a 16MHz xtal but it will take a few days.  There are currently a couple of threads where people are having similar problems using Linux versions (I don’t know if both threads are from the same person or not).  Unfortunately I can only test the Win32 builds (WinAVR). Regards.

rtosdemo does not work with mega128

Yes i have written a straight forward application using the ADCs and the UART with the 16MHz. The processor is happy with it and it all works well.

rtosdemo does not work with mega128

If you are referring to the guy using Atmega16… thats me. I am trying different ways to get this thing right. Using all the equipment and combinations i have available with me. Unfortunately i do not have a windows system around to test otherwise or i could have made a comparison to know if it was my fault or the tools. Thanks for the support! This forum is amazingly fast!

rtosdemo does not work with mega128

The fact that I can create coff files (albeit without any debug info) shows that there are some differences between the two GCC versions (Win32 and Linux).  I cannot image however any difference that would cause 16MHz to not work whereas 8MHz does.  Most odd. Would it be possible for you to zip up your FreeRTOS installation and send it to me – including all the generated .lst, .o and most importantly .map files along with the source and makefile etc.  Make sure you have 16MHz set before building. I can then use your source code to create my own build and compare the map and lst files.  Don’t know if this will help or not but I’m running out of ideas! Use the email address from the FreeRTOS contacts page (r dot barry at …. ) and sourceforge does not like binary attachments. Regards.

rtosdemo does not work with mega128

Sorry if i gave the wrong idea. With the Atmega128, it has not worked with either the 8MHz setting or the 16MHz, but with the ATMega16 it has worked at 8MHz. I am next going to try compiling at 16MHz for the ATmega16while running it at 8MHz and see if there is going to be any problem.

rtosdemo does not work with mega128

Will the demo application for MC9S12C32 work for MC9S12DP256B

rtosdemo does not work with mega128

will the demo application for MC9S12C32 work for MC9S12DP256B

rtosdemo does not work with mega128

I have started a new thread for this question – with the same title.

rtosdemo does not work with mega128

This matter was resolved by changing the serial port signal handler name from UART to UART0.  The ATMega128 has two ports, whereas the ATMega323 (on which the demo was created) only one.