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.
Tool/software: Code Composer Studio
I use the Captivat function on this device. I managed to get the software and hardware to work fine (just 1 proximity sensor.
I realised, that the compiler does not link in the existing ROM lib.
I found the following lines in "rom_captivate.h"
//! MSP430FR2512 Device ROM Header File
//
#elif defined (__MSP430FR2512__)
#include "rom_headers/rom_captivate_msp430fr2522_family.h"
//! MSP430FR2676 Device ROM Header File
//
#elif defined (__MSP430FR2676__)
#include "rom_headers/rom_captivate_msp430fr2676_family.h"
#else
#warning "Failed to match a ROM include file."
#endif
(in the "rom_map_captivate.h" file the ROM_CAPT_XXX functions are declared and enabled
looks like there is no provision for the MSP430FR2675??? but according to data sheet ROM lib is in there
I changed the device to MSP430FR2676 in the project menu and compiled again.
I opened the "Memory Allocation" -> still no ROMLIB usage!!
1.) what do I missed to use the ROMLIB
2.) how do I get the FR2675 ROMLIB
Thanks very much
Best regards
Kurt
Hello Kurt,
In the future, please use a more descriptive title when you make a new thread.
Kurtlin said:looks like there is no provision for the MSP430FR2675??? but according to data sheet ROM lib is in there
You're correct. Table 6-31 in the datasheet does show that the MSP430FR2676 device has the CapTIvate libraries in ROM.
Kurtlin said:2.) how do I get the FR2675 ROMLIB
Looking at the Devices with CapTIvate™ Software in ROM section in the CapTIvate ™ Technology Guide, I found the following instructions. They should help answer your question.
Example:
To call the library function “foo()”, it is recommended to make an implicit ROM call MAP_foo(). The complier parses through the rom_map_captivate.h file to determine if the function resides in ROM, and if it does, will make the ROM call. If this function does not exist in ROM then the compiler will make a call to the pre-compiled library version.
It is possible to explicitly call the function “foo()” from the pre-compiled library using foo(). The linker will pull this function from the pre-compiled library during the link process, adding the function to FRAM program memory. To explicitly call the function “foo()” from ROM, use ROM_foo(). This will force the compiler to make a call to ROM, with no impact on FRAM program memory.
Regards,
James
Hi James,
thanks for your answer.
all the CAP-functions are all declared in the "rom_captivate_msp430fr2676_family.h"
e.g.
#define ROM_CAPT_computeArcTanApprox \
((uint16_t (__cc_rom *)(int32_t i32XComp, \
int32_t i32YComp))ROM_CAPTIVATE_JUMPTABLE[1])
and
the redefined in "rom_map_captivate.h"
/ ROM vs. FRAM Calling Macro for CAPT_computeArcTanApprox()
#ifdef ROM_CAPT_computeArcTanApprox
#define MAP_CAPT_computeArcTanApprox \
ROM_CAPT_computeArcTanApprox
#else
#define MAP_CAPT_computeArcTanApprox \
CAPT_computeArcTanApprox
#endif
so far so good, but when I open the map file:
BSLCONFIGURATIONSIGNA 0000ff88 00000002 00000002 00000000 RWIX ffff
BSLCONFIGURATION 0000ff8a 00000002 00000002 00000000 RWIX ffff MEMORY CONFIGURATION
name origin length used unused attr fill
---------------------- -------- --------- -------- -------- ---- --------
TINYRAM 00000006 0000001a 00000000 0000001a RWIX
BSL0 00001000 00000800 00000000 00000800 RWIX
INFO 00001800 00000200 00000000 00000200 RWIX
TLVMEM 00001a00 00000200 00000000 00000200 RWIX
BOOTCODE 00001c00 00000400 00000000 00000400 RWIX
RAM 00002000 00001800 00000276 0000158a RWIX
FRAM 00008000 00007f80 00004480 00003b00 RWIX
JTAGSIGNATURE 0000ff80 00000004 00000004 00000000 RWIX ffff
BSLSIGNATURE 0000ff84 00000004 00000004 00000000 RWIX ffff
BSLI2CADDRESS 0000ffa0 00000002 00000002 00000000 RWIX ffff
INT00 0000ffa2 00000002 00000000 00000002 RWIX
no mentioning of a ROM!!!!???
best regards
Kurt
Hi Kurt,
Nice work! I can't explain why the ROM isn't shown in the MAP file. Are you using the CapTIvate linker file? Did you select the right memory model? All CapTIvate™ software library projects for those devices must be compiled using the small code small data memory model in order to be compatible with the ROM functions and the pre-compiled library.
Have you followed the instructions for Porting an Existing CapTIvate Project to a New Device?
Regards,
James
Hi James,
if you use the small model the compiler throws an error,
I found the following define statements
#if (defined(__TI_COMPILER_VERSION__) && !defined(__LARGE_DATA_MODEL__)) || \
(defined(__IAR_SYSTEMS_ICC__) && (__DATA_MODEL__!=__DATA_MODEL_LARGE__))
#error "Only large data model supported for this ROM."
#endif
#ifndef ROM_CAPTIVATE_MSP430FR2676_H_
#define ROM_CAPTIVATE_MSP430FR2676_H_
#if (defined(__TI_COMPILER_VERSION__) && defined(__LARGE_CODE_MODEL__)) || \
(defined(__IAR_SYSTEMS_ICC__) && (__CODE_MODEL__==__CODE_MODEL_LARGE__))
looks like you have to use the large model?!!!
best regards
Kurt
Hi Kurt,
I'll check on that. In the meantime, which CapTIvate Design Center version are you using? Is there a way that you could try updating to the latest version?
Regards,
James
Hi Kurt:
I can assist you moving forward. Sounds like you did some good work already. But like what James asked, what is your version? It is possible you may have a version from before FR2675 was released. Because I see FR2675 in "rom_captivate.h" on our side.
And as you have encountered, I wouldn't worry too much about code/data model. Our headers will throw errors and point you in the right direction, it's not something we expect people to just know. You are correct in saying FR2675 should be using large code model.
Hi James / Wallace,
I loaded the current CapTIvateDesignCenter from your website (1.82.00.06) and created a new project. I added a couple of calls in the main.c file to try it out. again, the same thing, no ROM lib used
I think it's easier if I send you the project and you can try for yourself.PTL3_Type2_HRC.zip
thanks for your help
best regards
kurt
Hi Kurt:
Thanks for sharing. I think I have pinpointed the answer to your question.
Clarification #1
If you look at the .map file (from the project you posted):
Hi Wallace,
thanks very much for your reply. I can see that the ROM lib is used.
I compiled for 2675 and 2676, in my program there is a difference of about 1k difference.
my problem is now, I am using the 2675 which comes up with the compiler warning "no ROM lib used" as there is no defines for it.
the rom_captive.h file has got only a defines for __MSP430FR2676__
is it ok just to copy and rename the
rom_captivate_msp430fr2676_family.h
file to
rom_captivate_msp430fr2675_family.h
not sure what the differences are????
thanks very much
best regards
Kurt
Hi Kurt:
I'll answer your question in 2 parts:
Thanks,
Wallace
Hi Wallace,
thanks very much for your help. the zip file was created new, so the rom_captive.h had a newer version. I copied the new version into the BASE directory, all working fine!
best regards
Kurt