Quality RTOS & Embedded Software

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


simple led blinker task crashing with msp430f5529

Posted by smithbone on October 28, 2013

I'm attempting to get a simple led blinker up and running on a msp430f5529 thats on the the TI AFE4490 Eval board.

When I try to create a task the system hangs.

I'm pretty sure I have clocks and such configured correctly. If I blink leds without creating a task it works and I used blinking leds to narrow down where in the FreeRTOS code things were dying.

I tracked the hang down to this line 113 in heap_1.c

~~~~~~ /* Ensure the heap starts on a correctly aligned boundary. */ pucAlignedHeap = ( unsigned char * ) ( ( ( portPOINTERSIZETYPE ) &ucHeap[ portBYTEALIGNMENT ] ) & ( ( portPOINTERSIZETYPE ) ~portBYTEALIGNMENT_MASK ) ); ~~~~~~

If I specify a configTOTALHEAPSIZE that's > 560 bytes then this line crashes.

Using a heap size of 512 bytes allows it to get further on but then I hit an ASSERT in tasks.c at line 518.

~~~~~~ /* Check the alignment of the calculated top of stack is correct. */ configASSERT( ( ( ( unsigned long ) pxTopOfStack & ( unsigned long ) portBYTEALIGNMENTMASK ) == 0UL ) ); ~~~~~~~

So I don't seem to have something set right in my memory setup. The FAQ says that if creating tasks hangs then it most likely related to the tick interrupt. I can't absolutely say that the tick timer is working but the interrupt vectors in the ti-txt file look correct.

I'm using Code Composer Studio

Any info or suggestions to try are welcome


simple led blinker task crashing with msp430f5529

Posted by richardbarry on October 28, 2013

If you are using LEDs to debug, can I assume you don't have a debugger that allows you to step through the code and inspect variables, etc.? If so, you are making your life very hard, and much less productive than it might otherwise be. It also limits the assistance we can provide as you will not be able to answer questions we might pose.

From your description so far, if what you think is happening is really happening, then it is not the tick interrupt. More likely a linker script problem, or a memory model setting (in CCS) issue.


simple led blinker task crashing with msp430f5529

Posted by smithbone on October 28, 2013

Its an eval board from TI and there's no JTAG header loaded. I don't have a UART either. I agree very sub-optimal but it's what I have.

I'm pretty sure what I describe above is where things go wrong as I can place while(1); hangs and LEDs to narrow it down to those lines.

I totally agree is probably some sort of CCS setting but so far nothing seems to help. If I change the code model to anything other than blank (not sure what default that is) I get unresolved symbols (_TIintXX) and changing the data model to large from blank also results in link errors. A data model of small compiles but does not make any difference.

Has a working MSP430 project using CCS 5.5 been created by anyone? It might help me to look at that and look for differences.

simple led blinker task crashing with msp430f5529

Posted by smithbone on October 28, 2013

I believe I have found the problem.

I didn't notice that the CCS demo code is for the MSP430X which is a different arch than MSP430. (20-bit addressing vs 16-bit). If I switch the arch to MSP rather than MSPX then I get illegal instructions.

Looks like I need to start with the code from portable/GCC/MSP430F449 and use that for my project rather than the 430X stuff.

simple led blinker task crashing with msp430f5529

Posted by smithbone on October 29, 2013

After further investigation it seems I'm wrong. The msp430f5529 is an MSPX type arch since it has > 64k of flash.

So I'm back at square 1.

[ 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.

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.


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


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