This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430 C++ tutorial

Hi, Im trying to get around understanding the C++ compiler within the IAR Workbench.

Basically Im following the steps on the tutorial  but i get

Fatal Error [e89]: To much object code produced (more than 0x100 bytes) for this package.

What does this mean and how can I get around it. Also where may I obtain a errors reference for this application.??

If anyone could point me to the right direction much appreciated.

Kind regards

JM

 

  • Hi,

    Is it possible that the error says more than 0x1000 bytes?  The free version of IAR will only allow you to produce 4K of code. You could upgrade to the full version, but that is kind of pricey. You could try out the CCS compiler from TI. They allow 16K of code.

    HTH,

    Barry

  • Jose Molina said:
    Im trying to get around understanding the C++ compiler within the IAR Workbench

    Are you already familiar with C++ in general?

    And are you also familiar with the constraints of using C++ in a small embedded microcontroller?

    Jose Molina said:
    where may I obtain a errors reference for this application

    Err -  wouldn't that be IAR...?!

  • Thanks Barry, I just found it a bit weird that they provide a document with tutorials to follow and some cannot be used due to the compiling restriction the free version has.

    Anyways I can link and create projects and flash leds (all of them) in different configurations. But moving forward

    Ive adapted some example codes that  I maybe able to expand into what im doing. My code will in no circumstance go over 4k in size.

    Question though.....

    when programming the Input Output ports, how can I assign a value read from the port. *input in this case. Just a digital voltage signal approx 2.2V.

    Once this signal is read lets say 2.0V can I store this as a High = 1 or Is it possible to use the value picked up as a float.?

    Also on the output side  P2DIR |= 0x01; (for port 2.0) is there a special way to configure the current, and voltage you can access from the MSP430 Output *?

    thanks

    JM

  • Jose Molina said:
    when programming the Input Output ports, how can I assign a value read from the port.


    Each port (let's assume Port 1 for the examples)  has its individual set of access registers.
    P1IN returns the logical state of all 8 pins if in input mode, P1OUT defines teh logical state of all 8 pins if in output mode, P1DIR defines which pin is in input and which is in output mode.
    On some MSPs, there are registers for enabling the internal pullups (if available) and for defining whether they are pullups or pulldowns. Also, on some MSPs, you can switch the output drive strength between reduced and full strength. Basically, this register defines whether one or two output transistors are driven, doubling the maximum output current.

    However, all these registers deal with logical levels, and there is no way to define which voltage is what level. The typical trigger levels are defined in the datasheet, including the hysteresis (almos tall MSP port pins are schmitt trigger inputs). And the typical output voltages depend on the currend drawn from the port pin. There are degradation curves in the datasheet. (if not, pick a datasheet from a different member of the same MSP family - the values are mostly the same)

    If you really need to define the exact voltage levels, then you need to use an MSP with internal ADC, do analog/digital conversion, calculate the current voltage and decide how to interpret it. There are at most 12 analog inputs available on MSPs with ADC. Also, there are MSPs with DAC. There are only two channels (= output pins) available where you can define the output voltage (up to the maximum specified load current) with 12bit resolution.

**Attention** This is a public forum