Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training




Loading

rtosdemo does not work with mega128

Posted by Nobody/Anonymous on May 29, 2005
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?

RE: rtosdemo does not work with mega128

Posted by Richard on May 29, 2005
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.

RE: rtosdemo does not work with mega128

Posted by Nobody/Anonymous on May 29, 2005
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

RE: rtosdemo does not work with mega128

Posted by Nobody/Anonymous on May 29, 2005
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?

RE: rtosdemo does not work with mega128

Posted by Richard on May 29, 2005
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.

RE: rtosdemo does not work with mega128

Posted by Nobody/Anonymous on May 29, 2005
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.

RE: rtosdemo does not work with mega128

Posted by Nobody/Anonymous on May 29, 2005
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!


RE: rtosdemo does not work with mega128

Posted by Richard on May 29, 2005
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.

RE: rtosdemo does not work with mega128

Posted by Nobody/Anonymous on May 30, 2005
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.

regarding demo application for HCS12

Posted by Nobody/Anonymous on May 30, 2005
Will the demo application for MC9S12C32 work for MC9S12DP256B

RE: rtosdemo does not work with mega128

Posted by Nobody/Anonymous on May 30, 2005
will the demo application for MC9S12C32 work for MC9S12DP256B

RE: regarding demo application for HCS12

Posted by Richard on May 30, 2005
I have started a new thread for this question - with the same title.

RE: CONCLUSION rtosdemo does not work

Posted by Nobody/Anonymous on June 11, 2005
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.


[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists