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

ATMega128 and the stack pointer with GCC

Posted by Nobody/Anonymous on September 30, 2005
Hi all
I have just ported the AVR323 GCC code to the at128. After much fiddling around I managed to get a cut down version of the demo app working.

However i found the the stack pointer at the entery to the main function was incorrectly set to 0x10FF ie 8k. The ATmega128 is according to the data sheet has 4k Internal SRAM. To get the demo app to run I had to use the

-minit-stack=0xFFF

command in the makefile

I would be greatful if anyone could shed some light on this.

RE: ATMega128 and the stack pointer with GCC

Posted by Nobody/Anonymous on September 30, 2005
Thats odd, but from what I have seen on the AVR ports FreeRTOS does not have any effect until after main() is called, so this must be a linker or configuration problem.

Did you set the 'MCU = ' flag correctly in the makefile? Although if you left it configured for a 323 the SP should not end up at 8K.

Can you take a look at the map file and see the memory configuration.

What is the heap size set to in FreeRTOSConfig.h?

RE: ATMega128 and the stack pointer with GCC

Posted by Nobody/Anonymous on October 1, 2005
I also had problems getting the demo to run on mega128. Two things fixed the problems:

1. Make sure to change `SIGNAL( SIG_UART_DATA )' to `SIGNAL( SIG_UART0_DATA )'.

2. Do a `make clean'. This should not be necessary, but the makefile seems broken. You may want to do this for every compile after non-trivial changes.

/Lars Hamren

RE: ATMega128 and the stack pointer with GCC

Posted by Nobody/Anonymous on October 4, 2005
Many thanks guys!

Barry

RE: ATMega128 and the stack pointer with GCC

Posted by Nobody/Anonymous on October 7, 2005
Guys, what exactly do you mean by "porting"? It works with Atmega128 nearly "out of the box" - may tale 15 minutes to get it running.

Alex.


[ 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