msp430

Missing platform-conf.h in Thingsquare Mist (Contiki-OS)

不羁岁月 提交于 2019-12-11 17:51:07
问题 I cloned the Contiki-OS port Thingsquare mist to work with Texas Instruments EXP430 board. When I run Hello World from the respective folder make TARGET=mist-exp5438 I get the error that platform-conf.h is missing: In file included from ../../contiki/core/./net/rime/rimeaddr.h:57:0, from ../../contiki/core/net/rime/rimeaddr.c:45: ../../platform/mist-exp5438/./contiki-conf.h:36:27: fatal error: platform-conf.h: No such file or directory compilation terminated. Does anyone know how to write a

MSP430F5438 SD card using an SPI interface

僤鯓⒐⒋嵵緔 提交于 2019-12-11 12:05:59
问题 I want to connect an SD card using the SPI interface of MSP430F5438. The hardware part is correct in my design, however I could not send any data to the SD card. The source code I use is from Secure Digital Card Interface for the MSP430 . For debugging, how could I send data to the SD card? The data should be received from the ADC12MEM registers and just need to be written in the SD card. From this source code above, there is no process, when I debug and I could not send any user input to the

Does “static/extern uint8_t array[2] = {0};” conform to the ANSI C specification?

跟風遠走 提交于 2019-12-09 15:53:33
问题 I've a question regarding the following code: #include "all_needed.h" static uint8_t array[2] = {0}; void main(void) { ... } Is a (module) global array allowed to be initialized as above for having each member set to zero while being ANSI C conform? I've got a problem in Code Composer 5 (MSP430 Project) where I had to change it into static uint8_t array[2] = {0, 0}; for a correct initialization of the 2nd member of the array. 回答1: Yes, this is allowed, and should initialize the array to zero.

Adding my own library to Contiki OS

倖福魔咒の 提交于 2019-12-05 08:26:37
I want to add some third party libraries to Contiki, but at the moment I can't. So I wanted to just test with a simple library. I wrote two files hello.c hello.h, in hello.c I have: printf(" Hello everbody, library call\n"); In hello.h I have: extern void print_hello(); I created hello.o using the command: msp430-gcc -mmcu=msp430f1611 hello.c -o hello.o I created an archive file: ar -cvq libhello.a hello.o I move to contiki, i write a simple program that calls hello.h to execute a function.I try to include hello.a using PROJECT LIBRARIES variable in the makefile, when i compile i get this :

How to pass a compile flag to cmake initial compiler test?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-05 02:04:58
I'm trying to use CMake for building a project which uses the MSPGCC cross-compiler for a MSP430 microcontroller. To successfully compile any simple program with it, we need to pass a compile flag indicating the target processor, or else it fails like this: $ msp430-gcc -o test test.c In file included from test.c:1:0: /usr/local/lib/gcc/msp430/4.6.3/../../../../msp430/include/msp430.h:813:2: warning: #warning Unable to identify and include MCU header, use -mmcu=MCU [-Wcpp] /usr/local/lib/gcc/msp430/4.6.3/../../../../msp430/bin/ld: cannot open linker script file memory.x: No such file or

How to declare an interrupt handler (ISR) in Mspgcc?

让人想犯罪 __ 提交于 2019-12-04 10:51:14
问题 What is the preferred method of declaring an interrupt handler in mspgcc? 回答1: Just to clarify, because this is an early Google result. __attribute__((__interrupt__(TIMER0_A0_VECTOR))) void __isr_5(void) { ... } Current GCC still (I believe this is what arvindpdmn commented about) raises an error, when using above syntax. internal compiler error: in msp430_attr, at config/msp430/msp430.c:1835 { ^ An issue was raised for this after a report of this in the TI E2E community, but said issue is

Does “static/extern uint8_t array[2] = {0};” conform to the ANSI C specification?

限于喜欢 提交于 2019-12-04 03:07:13
I've a question regarding the following code: #include "all_needed.h" static uint8_t array[2] = {0}; void main(void) { ... } Is a (module) global array allowed to be initialized as above for having each member set to zero while being ANSI C conform? I've got a problem in Code Composer 5 (MSP430 Project) where I had to change it into static uint8_t array[2] = {0, 0}; for a correct initialization of the 2nd member of the array. Yes, this is allowed, and should initialize the array to zero. C99, §6.7.8 p10: If an object that has static storage duration is not initialized explicitly, then: — if it

How to declare an interrupt handler (ISR) in Mspgcc?

Deadly 提交于 2019-12-03 07:58:13
What is the preferred method of declaring an interrupt handler in mspgcc? Just to clarify, because this is an early Google result. __attribute__((__interrupt__(TIMER0_A0_VECTOR))) void __isr_5(void) { ... } Current GCC still (I believe this is what arvindpdmn commented about) raises an error, when using above syntax. internal compiler error: in msp430_attr, at config/msp430/msp430.c:1835 { ^ An issue was raised for this after a report of this in the TI E2E community , but said issue is still in its "Planned" state and it is unclear who the tracker even belongs to. (You can access the issue via

MSP430G2553 Timer Intervals [closed]

不问归期 提交于 2019-12-02 05:18:33
After reading the text about five times and googling I've decided to reach out for help. I'm currently in the process of using Timer_A interrupt to turn on/off two LEDS in intervals of 1 second/10 seconds/1 minute one at a time. The default program will turn on/off the LEDS every second but I cannot find a way to turn them off after 10 seconds and a minute. I can use __delay_cycles(xxxx) to achieve this but apparently doing so would defeat the purpose of the timer. This is my code. #include <msp430.h> #define RedLED BIT0 #define GreenLED BIT6 #define RedLEDToggle (P1OUT ^= RedLED) #define

FreeRTOS configTICK_RATE_HZ

孤人 提交于 2019-12-02 03:22:37
问题 I am using an MSP430f5438 with version 5.4 of FreeRTOS. I am having a funny problem that I can't figure out. Basically, when I set configTICK_RATE_HZ to different values, the LED blinks faster or slower; it should stay the same rate. It blinks slower the higher i set configTICK_RATE_HZ, and faster when I set TICK_RATE lower. vTaskDelayUntil( &xLastFlashTime, xFlashRate ); is such that the LED should only blink once a second no matter what the configTICK_RATE_HZ is. I stepped through and