EmbeddedRelated.com

How Does Crossworks layout structures on an MSP430

Started by Ivan Vernot in MSP43019 years ago 4 replies

Hello All, My I cannot see it documemented how CrossWorks arranges (ie packs) its structures on an MSP430. I know that compilers for 'larger...

Hello All, My I cannot see it documemented how CrossWorks arranges (ie packs) its structures on an MSP430. I know that compilers for 'larger micros' often 'pad' the structure elements so that they fit on a 16bit/32 bit boundary. But I cannot see where this is documented for the CrossStudio Compiler and looking at my data (as memory) is not 'definitive'. It seems to me that there would be a


How to force the C-compiler to use registers? [ND-Cerberus checked]

Started by reym...@... in MSP43020 years ago 11 replies

Dear all, I've been wondering for a while how to avoid this enormous waste of mem I presently have in the code generated from my...

Dear all, I've been wondering for a while how to avoid this enormous waste of mem I presently have in the code generated from my program. The problem I have consists of a rather complex digital logic with very simple algorithms. In other words, the program is a huge bunch of if()'s with very little maths. I tried to write it as modular as I could and as a result I need many static and gl


Bootloader

Started by mrobins99 in MSP43016 years ago 9 replies

I am interested in making a bootloader for the MSP430FG4618 using IAR 4kb kickstart version. I have experience making bootloaders for AVR uCs...

I am interested in making a bootloader for the MSP430FG4618 using IAR 4kb kickstart version. I have experience making bootloaders for AVR uCs using x-modem and proprietary protocols, and I would like to do something similar with this chip and compiler. The idea is this: 1. the uC starts(inits) 2. delays say 5 seconds 3. if signalled to upgrade within delay period then proceed with...


Predefined symbol in IAR

Started by FB in MSP43016 years ago 1 reply

Hi! I would like to know at compiler time which target is selected in the proyect option in IAR. I've seen that __tid__ is not reccomended. It...

Hi! I would like to know at compiler time which target is selected in the proyect option in IAR. I've seen that __tid__ is not reccomended. It recommends the use of __icc430__ but it doesn't say hoq to use it. Please I would like to have more detailed description of that macro. Thanks! FB No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.488 / Virus ...


Compiler Startup and Exit code for F201x

Started by vincbr900 in MSP43016 years ago 6 replies

Hi, I am using the ez430. I cant help noticing that precious bytes are being lost on _exit __exit functions and startup code. Does anyone have...

Hi, I am using the ez430. I cant help noticing that precious bytes are being lost on _exit __exit functions and startup code. Does anyone have any lean startup and exit function they would be willing to share, along with caveats? With only 2kbytes to work with everything counts! Thanks, Vincent


Integer arctan calculation

Started by Mike Unger in MSP43019 years ago 18 replies

I need to do an arctan calculation from the readings of a pair of A/D converters. I, of course, can use the built in arctan function with...

I need to do an arctan calculation from the readings of a pair of A/D converters. I, of course, can use the built in arctan function with the compiler but that takes up a lot of code space and is way more accurate than I need. My sin and cos values are 10 bit numbers (0 - 1023) and I need a result that is also a 10 but number. E.g. 0 degrees gives 0, pi/2 gives 256, pi gives 512, you g


storing a variable in a dedicated register

Started by Jim_Strieter/Rockwell_Automation_Strieter/CONTRACT/NorthAmerica/RA/Rockwell in MSP43019 years ago 1 reply

Everybody, I am using the '430F1232. I need to store a variable constantly all the time permanently in register 15. Doing it in assembly looks...

Everybody, I am using the '430F1232. I need to store a variable constantly all the time permanently in register 15. Doing it in assembly looks like #define [variable name] R15 I tried entering that into my C program ('cause I have to do this in C), and the compiler bawlks at it. The online help talks about this statement __regvar __no_init int NMA @ __R5; but implies that it only wo


Segments in IAR Assembler

Started by Kipton Moravec in MSP43018 years ago 2 replies

I am writing for a MSP430F2012. I am writing it mostly in C with the interrupts in assembler for the IAR Compiler Here is what I have: ...

I am writing for a MSP430F2012. I am writing it mostly in C with the interrupts in assembler for the IAR Compiler Here is what I have: ;------------------------------------------------------------------------------- ; Public Data ;------------------------------------------------------------------------------- RSEG interrupt_d :DATA ; 16-bit


Using C with ...1121; stack size?

Started by Mark Skeels in MSP43021 years ago 5 replies

Hi, List. Now that I am the veteran of one successful project using the MSP430F149, I am designing my second using the MSP430F1121 for a...

Hi, List. Now that I am the veteran of one successful project using the MSP430F149, I am designing my second using the MSP430F1121 for a legitimate low power app: a battery powered remote control RF widget. I started constructing the transmitter end, beginning with the LED flasher demo suppiled with the IAR C compiler. (Did I mention this is presently being developed in C?) As soon as I a


in-line C language routines

Started by lbra...@... in MSP43020 years ago 6 replies

Hello Anders Lindgren and everyone else How do I in-line C Language routines with the IAR Compiler in order to avoid the overhead of a...

Hello Anders Lindgren and everyone else How do I in-line C Language routines with the IAR Compiler in order to avoid the overhead of a function call?


Defining code location in memory

Started by "faro.salvatore" in MSP43014 years ago 12 replies

First of all thanks to anyone that can shed some light to my questions... I'm writing a bootloader and have a few doubts on how to proceed in...

First of all thanks to anyone that can shed some light to my questions... I'm writing a bootloader and have a few doubts on how to proceed in some simple things: 1) What is the best way to put a jump from the bootloader to the main application using c code? Or should I embed asm code with a jmp instruction to do this?? 2) How do I instruct my compiler (Rowley Crossworks) to compile my cod...


Sending a string or multiple characters to UART0 MSP430F149 using ImageCraft

Started by Jeff Scharpf in MSP43018 years ago 7 replies

Hi, I am new to this list. I have done a search and I see several results but I'm still not able to get this just right. I have an...

Hi, I am new to this list. I have done a search and I see several results but I'm still not able to get this just right. I have an MSP430F149 and I'm using Imagecraft C compiler. I am new at using the MSP430, and I've been able to transmit one character out the UART0 port using example code, etc. The problem is I don't know how to send more than one character. No matter what I "put" i...


how to use anonymous objects in IAR?

Started by aliko in MSP43014 years ago 5 replies

Why this simple code not working with IAR C/C++ Compiler for MSP430 4.21.2 struct rng { rng(int n) : i(n) {}; int i; }; rng *r[] =...

Why this simple code not working with IAR C/C++ Compiler for MSP430 4.21.2 struct rng { rng(int n) : i(n) {}; int i; }; rng *r[] = {&rng(9), &rng(0)}; It gives Error[Pe158]: expression must be an lvalue or a function designator ------------------------------------


Hi all, Stack overflow

Started by Bobby Baskar in MSP43015 years ago 3 replies

Dear All, =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Can anyone help me in solving th= is problem in IAR compiler. =A0 The stack 'Stack' is...

Dear All, =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Can anyone help me in solving th= is problem in IAR compiler. =A0 The stack 'Stack' is filled to 92% (74 bytes used out of 80). The warning t= hreshold is set to 90% =A0 Have a nice day. =A0 Bobby Now, send attachments up to 25MB with Yahoo! India Mail. Learn how. h= ttp://in.overview.mail.yahoo.com/photos ---------------...


ACLK has two frequencies

Started by Darren Logan in MSP43019 years ago 3 replies

Hi all, I have an 8MHz crystal attached to XIN / XOUT of my MSP430F149. In software (IAR C Compiler), I am dividing LFXT1CLK by 8 to give...

Hi all, I have an 8MHz crystal attached to XIN / XOUT of my MSP430F149. In software (IAR C Compiler), I am dividing LFXT1CLK by 8 to give me 1MHz out of ACLK. 1MHz is indeed present on ACLK but there is also a 40Hz (approx.) square wave imposed on it!!!. Does anyone know why this is? Best regards Darren Logan BSc(Hons) Development Engineer ________________________________________


WEIRD BEHAVIOUR OF IAR (YET AGAIN)

Started by Onestone in MSP43010 years ago 14 replies

I've gone back to an older design to upgrade the software. The design uses an MSP430F149. A couple of months ago I upgraded Kickstarter to...

I've gone back to an older design to upgrade the software. The design uses an MSP430F149. A couple of months ago I upgraded Kickstarter to slac050aq, or version 5.52. It seemed to be OK for the newer micros I was working with, but now it seems to be behaving strangely. It won't revert to compiler mode from debug mode, it crashes. It doesn't seem to recognise or act on most breakpoints, i...


A real world benchmark + a review

Started by microbit in MSP43020 years ago 16 replies

Hi All, Some of you may recall my enthusiasm for Rowley's CrossWorks for MSP430 since quite some time :-) We all know that some C tool chain...

Hi All, Some of you may recall my enthusiasm for Rowley's CrossWorks for MSP430 since quite some time :-) We all know that some C tool chain companies tend to produce *slightly* biased benchmarks on their tools, so I decided to do an actual REAL test, mainly comparing EW430 V2.10 and RAL CW430 V1.2 (I am in the process of testing on HITECH-C's HITide and compiler V9.00) I ported a project


HELP !!!!!! I have a MSP1322 that will not leave the exit locations

Started by douglas2355 in MSP43018 years ago 3 replies

To all the hard working crew I have a wierd bug in a MSPF1232. I use a the IAR c compiler and the processor constantly goes to an endless...

To all the hard working crew I have a wierd bug in a MSPF1232. I use a the IAR c compiler and the processor constantly goes to an endless jmp loop 'FF3F' to itself. This instruction is placed just after the call to main in the starup file. If change JTAG tools or compilers ( same results with IMAGECRAFT ) the results are the same. Is this some permenent flash option in the MSP430. It


IAR for MSP430F2013 and subroutines with more than 4 arguments

Started by jappelino in MSP43015 years ago 10 replies

I had a subroutine with six arguments of type unsigned char. The two last ones were put on the stack and the first four in registers by the IAR...

I had a subroutine with six arguments of type unsigned char. The two last ones were put on the stack and the first four in registers by the IAR C compiler. When the routine returned the stack was not corrected and I ended up in a stack overflow. I temporarely solved this by using two global variables, is there any box under options I need to tick to get this to work the normal way? ----...


IAR project port to Crossworks issue

Started by finefrenzyrolling in MSP43014 years ago 18 replies

I am attempting to convert a working IAR embedded workbench project to crossworks CrossStudio and am having some difficulty with the difference...

I am attempting to convert a working IAR embedded workbench project to crossworks CrossStudio and am having some difficulty with the difference between compilers. I believe I have worked out the interrupt issues and the program does run but it does not behave as expected, in fact it does not do anything I can see. The crossworks compiler did give several of the following warnings: "result of ...