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.

Compiler/MSP430F67471A: --small_enum option problem

Part Number: MSP430F67471A
Other Parts Discussed in Thread: MSP430F5529

Tool/software: TI C/C++ Compiler

Hello.

I have several questions.

I am facing the problem when I compiled my project with --small_enum option.

I want to minimize enum variable size in my project.

Then, I executed following procedure:

1.Open the project properties, and select "MSP430 Compiler" from the left side window.

2.Select the "Edit Flags...", and add "--small_enum" 

3.Close project properties, and clean the project added --small_enum option.

4. Build the project.

After executing procedure 4, many warning messages are appear like this:

Description Resource Path Location Type
#16027-D object files have incompatible enumeration types ("C:/ti/tirtos_msp43x_2_20_00_06/products/tidrivers_msp43x_2_20_00_08/packages/ti/drivers/lib/drivers_MSP430F5529.ae430X<GPIOMSP430.oe430X>" = integer (default), "./MSP_EXP430F5529LP.obj" = char/short (--small_enum)) uartecho_MSP_EXP430F5529LP_TI_MSP430F5529 C/C++ Problem

Are there any advice to solve this problem?

Following is described in the section 5.6.1, in the SLAU132O.

NOTE: Do not link object files compiled with the --small_enum option with object files that were compiled without it. If you use the --small_enum option, you must use it with all of your C/C++ files; otherwise, you will encounter errors that cannot be detected until run time

I think this problem is related the above.

Could you tell me how to compile all object files with --small_enum option?

I am using msp430_15.12.3.LTS compiler, and my project based on uartecho_MSP_EXP430F5529LP_TI_MSP430F5529 in the TIRTOS for MSP430 package.

I confirmed following thread, but I have no idea to solve this problem.

I am waiting for TI employee's comment. 

 Regards,

uchida-k

  • Uchida-K said:

    After executing procedure 4, many warning messages are appear like this:

    Description Resource Path Location Type
    #16027-D object files have incompatible enumeration types ("C:/ti/tirtos_msp43x_2_20_00_06/products/tidrivers_msp43x_2_20_00_08/packages/ti/drivers/lib/drivers_MSP430F5529.ae430X<GPIOMSP430.oe430X>" = integer (default), "./MSP_EXP430F5529LP.obj" = char/short (--small_enum)) uartecho_MSP_EXP430F5529LP_TI_MSP430F5529 C/C++ Problem

    Are there any advice to solve this problem?

    The only solution is to obtain a variant of that library built with --small_enum.  I do not know whether such a variant is available, or if procedures are documented which allow you to build one.

    Thanks and regards,

    -George

  • Hi George,

    Thank you for your reply.

    If you get any update about this question , I'd like to receive your information.

    Regards,

    uchida-k
  • You can rebuild TI-RTOS with --small_enum but you need to make several changes. Makefiles for all the libraries (e.g. driverlib, drivers, UIA, etc.) would have to be changed and ran. For the kernel, you have to add it into BIOS.customCCOpts. For example:

    BIOS.customCCOpts = "-vmspx --near_data=none --code_model=large --data_model=restricted -q --advice:power=1 --program_level_compile -o3 -g --optimize_with_debug --small_enum";

    I really don't recommend this though. There has been zero regression testing with this setting. I don't think it's worth the risk to save a few bytes.

    Todd
  • Hi ToddMullanix

    I'm sorry to delay.
    Thank you for your reply.

    I'll try that.
    If there is any question again, I will post this thread.

    Regards,

    uchida-k