Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


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 ]    [ Privacy ]    [ Sitemap ]    [ ]


Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Renesas

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

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

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner