EmbeddedRelated.com

Register variable in C

Started by g0tty0 in MSP43016 years ago 2 replies

Hi, Is it possible to force compiler to place a local non-static variable to general purpose register? I'm using IAR EW430 v4.10A. Best...

Hi, Is it possible to force compiler to place a local non-static variable to general purpose register? I'm using IAR EW430 v4.10A. Best regards, Max


MSPGCC and MSP430X

Started by linked82 in MSP43016 years ago 9 replies

Hi all, Does have mspgcc compiler support for MSP430X cores? If not, does exist any patch to make it work? Best...

Hi all, Does have mspgcc compiler support for MSP430X cores? If not, does exist any patch to make it work? Best Regards. ------------------------------------


alignment

Started by from...@... in MSP43019 years ago 3 replies

How paranoid do I have to be about word alignment when working in C on the '430? I think we had someone in here a while back who'd defined a...

How paranoid do I have to be about word alignment when working in C on the '430? I think we had someone in here a while back who'd defined a struct with a 16-bit value starting an odd number of bytes in, and had got no warning from the compiler he was using. I assume I should just worry if I put (unsigned*) in front of something which was char*, and make sure it is an even value I'm ca


IAR STACK

Started by Franco Bucafusco in MSP43015 years ago 1 reply

Hi! I would like to know if IAR brings to the user some way to know the start address of the stack as well its size. I know that project...

Hi! I would like to know if IAR brings to the user some way to know the start address of the stack as well its size. I know that project options gives you the chance to change the size, but also I would like some way to know it at compiler time. thanks. ------------------------------------


How to include a file in IAR

Started by giorgioel in MSP43014 years ago 4 replies

Hello! Can anybody suggest me how to include a binary data file in my program created in IAR compiler and then reference it by address? Thank...

Hello! Can anybody suggest me how to include a binary data file in my program created in IAR compiler and then reference it by address? Thank you in advance, Giorgio ------------------------------------


expression has not efect

Started by "Daniel H. Sagarra" in MSP43017 years ago 15 replies

Some one know why the compiler warring at: set_bit (i,3); in the folowing code ?: #define bit_set(a,b) ((a) | (1 < < (b))) main() { ...

Some one know why the compiler warring at: set_bit (i,3); in the folowing code ?: #define bit_set(a,b) ((a) | (1 < < (b))) main() { static int i = 1; bit_set (i,3); // expression has no efect i |= (1 <


Global Interrupt Enable

Started by Nico Bollen in MSP43018 years ago 2 replies

Dear, Does anybody know how to check in IAR C compiler if the GIE(Global Interrupt Enable)-bit is set? Thanks

Dear, Does anybody know how to check in IAR C compiler if the GIE(Global Interrupt Enable)-bit is set? Thanks


UART RX Question

Started by santabarbara350z in MSP43018 years ago 1 reply

I am stumped as to what to do. I am trying to read in a message (only 10 bytes MAX) in hex, and then do something with it (the 3rd byte...

I am stumped as to what to do. I am trying to read in a message (only 10 bytes MAX) in hex, and then do something with it (the 3rd byte has the length of the data, the 4th-? bytes have the data, etc). I am using the ICC430 compiler. I've tried to use strcmp() to compare the packets, since I know what they will look like, with no success. I have created a buffer, but don't know how to sta


__delay_cycles() problem

Started by meistak in MSP43015 years ago 2 replies

Hello I am using the MSP430 F1611 with the Crossworks Compiler. The MCLK is 7.3728 MHz. So when I use __delay_cycles(737280) i expected a...

Hello I am using the MSP430 F1611 with the Crossworks Compiler. The MCLK is 7.3728 MHz. So when I use __delay_cycles(737280) i expected a delay of 100 ms. Instead the delay is 273 ms (measured with the timer and the 32.768 kHz clock). Interrupts are switched off. Did I understand something wrong here? Best regards MeistaK ------------------------------------


C language tools to use with MSP430 or ...

Started by Ing. Morra Antonio in MSP43020 years ago 115 replies

Hi to all ! I am back after some time spent on different projects. Before I start a new design on the MSP430, I have a question for you all,...

Hi to all ! I am back after some time spent on different projects. Before I start a new design on the MSP430, I have a question for you all, if you care to share your experience. What tools are you using together with a C compiler, to keep track of versions and the like? Also are you using a program checker like LINT ? And, depending on the answer, why YES or why NOT? It is a bit of a gen


Reading status register

Started by Mike Raines in MSP43015 years ago 12 replies

Folks, I'm trying to read the status register to see if the cpu is off while inside the SYSNMI ISR. I have tried if (SR & CPUOFF) and if (R2 &...

Folks, I'm trying to read the status register to see if the cpu is off while inside the SYSNMI ISR. I have tried if (SR & CPUOFF) and if (R2 & CPUOFF) and the compiler doesn't recognize SR or R2. I'm sure this is simple. What am I missing? MSP430F5438 chip... Thanks, Mike Raines ------------------------------------


Why no Multitasker in C compilers?

Started by grahamgollings in MSP43021 years ago 36 replies

I have wondered for a while why the various C compilers available do not provide a simple multitasking environment. I gather you have to go...

I have wondered for a while why the various C compilers available do not provide a simple multitasking environment. I gather you have to go to 3rd party sources to add this facility. But surely if one of the C Compiler suppliers did supply a small core then this would be a bit of a marketing advantage? Can someone explain if/why there is a problem of doing this?


how to download the code from MSP430?

Started by magzky02 in MSP43016 years ago 2 replies

I cant figure out from my IAR compiler how to read the code from the MSP430 and save it. I have borrowed a board with MSP430 already...

I cant figure out from my IAR compiler how to read the code from the MSP430 and save it. I have borrowed a board with MSP430 already programmed. I need to reprogam it to test my code but i should return the oroginal code afterwards. Anyone? ------------------------------------


MSP430 C Compiler-Debugger Performance

Started by Cem OZDERE /Empa in MSP43020 years ago 6 replies

Hi all, There are so many C compilers around and I am looking for the cheapest and most effective product . Is there anyone who has a chart or...

Hi all, There are so many C compilers around and I am looking for the cheapest and most effective product . Is there anyone who has a chart or something like that shows the performance and prices of these compilers ? Also some internet adresses of free C compilers would be very helpful . Best Regards CEM


Help with TImer_A registers?

Started by Richard Cooke in MSP43017 years ago 1 reply

Hi Folks, I folks ? I'm the knucklehead that needed help with Timer_A and reading/decoding and IR signal. I think I (sort of) know what I...

Hi Folks, I folks ? I'm the knucklehead that needed help with Timer_A and reading/decoding and IR signal. I think I (sort of) know what I want to do but I can't figure out how to set up the TACCTL0 register. I'm using the free IAR compiler (I've never been all that comfortable with assemblers). I want to be able to capture the timer value when a pulse comes in. My signal is connected...


CONST IAR optimization

Started by FB in MSP43016 years ago 19 replies

Hi! Hi! I have a software that need to have some values stored in flash.=20 As an example I defined: const float dT =3D { 2...

Hi! Hi! I have a software that need to have some values stored in flash.=20 As an example I defined: const float dT =3D { 2 }; Obviously 2 is the default value.=20 Now, when I pass the address of that variable to a function the compiler do the right thing (In this case I can see dT defined in the .map file) When I use the variable in any other part of the code (not passi...


MSP430 compiler recommendations

Started by edgershwin in MSP43019 years ago 30 replies

We are considering embarking on a project using the MSP430. I've done some google searches for info on various compilers but not had much/any...

We are considering embarking on a project using the MSP430. I've done some google searches for info on various compilers but not had much/any luck in determining which one(s) to avoid and which one(s) are the best. I've used TI CCStudio for 62xx family and that software was frought with problems, so I'm reluctant to try to use TI's tools. Any recommendations? Thanks, Paul


hex to decimal conversion in c

Started by Madhav J Joshi in MSP43019 years ago 4 replies

I am learning to use embedded c for msp430. I am using IAR c compiler which comes with the kick start. I will appreciate some help on the...

I am learning to use embedded c for msp430. I am using IAR c compiler which comes with the kick start. I will appreciate some help on the following : Please let me know whether there is any standard c function which converts hex value into decimal value ,say by simply writing following type of code : DecimalValueVariable= C_ConversionFunction(HexValueVariable); If such standard funct


Re: compiler - simulator

Started by Alexandre Tereso in MSP43021 years ago 21 replies

Hi When I started developing for the MSP I was thinking on using a Simulator, but I found that it wasn?t a good choice. The best to do if you...

Hi When I started developing for the MSP I was thinking on using a Simulator, but I found that it wasn?t a good choice. The best to do if you just want to simulate the code is to use the CrossStudio, together with a simple board+Jtag from Olimex, since they are very cheap and with CrossStudio you can do the ISD Perfectly. Regards Alexandre Cal? Tereso -----Original Message----- Fro


IAR: May this instruction be optimized out?

Started by reym...@... in MSP43018 years ago 14 replies

Dear all, I've been argueing with IAR's support for some time about this. Since we could not a conclusion yet, I'd like to hear your...

Dear all, I've been argueing with IAR's support for some time about this. Since we could not a conclusion yet, I'd like to hear your optinion. The statement is *(int*)__segment_begin("DATA16_N") = 0; There s a certain constallation where the compiler entirely throws this instruction away. (No, it's not dead code.) In my opinion this is illegal according to the language as the