Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 
    SOLVED

    BSEC library on MSP430

    BSEC library on MSP430

    ziomau10
    Member

    Hi,
    I am trying to fit the BSEC library on an MSP430FR with 64K FERAM and 2K RAM.
    According to the size specifications of the BSEC library it should fit, but I cannot find a way to do it.

    The library is compiled with the small model, so it is possible to use only the lower 46K of the available FERAM, but it should fit anyway.
    The requirements should be 32K/1K and at the moment I havo no other code but the BSEC and BME680 driver code.

    I am using the gcc compiler (GNU 7.3.2.154 Mitto System) inside the CCS from ti, and I always have many errors like: `.text' will not fit in region `ROM'

    Can someone help me?

    Regards.
    Mau.

    8 REPLIES 8

    kgoveas
    Community Moderator
    Community Moderator

    Hi,

    Note that the BSEC library depends on additional libraries like the math library. One can swap out the standard math library with third-party libraries that offer a smaller code size at the cost of precision. In case this is not an option, we also offer a BSEC lite version which is a subset of BSEC library with reduced code size & memory requirements. It does not include functions to save the state of BSEC, if the device powers down.

    Thank you for your answer.

    I tryed also the lite version, but the combination of bsec library, bme680 driver, math and standard library and a small main that calls few functions (bsec_integration.c), results in the following sizes:
    Full version 70'521 bytes
    Lite version 58'603 bytes

    The problem is that the bsec library is compiled with the small model, and thus it can use only the feram portion below 64K
    Unfortunately even with a 64K or more processor, the available memory below 64K is about 46K, so I don't understand how it is ever possible to fit the library in this processor family (MSP430FRxxxx).

    Do you have any suggestion?
    Or, maybe a version of the library built using the large model?

    Regards.
    Mau.

    kgoveas
    Community Moderator
    Community Moderator

    Hi ziomau10,

    Can you elaborate on your comment, Or, maybe a version of the library built using the large model?

    We have 2 deliveries at the moment as you have already tried. An alternative would be to check if you already have code size optimization switched on and enable additional options to compress the rest of the code you already use. 

    Sorry for the late reply.
    The memory of the MSP430 is always divided into a low bank up to 64K where there is also the RAM and most peripherals, and an upper bank above 64K.
    The lower bank is about 40K, not enough to store the library alone, and part of the bank is dedicated to interrupt vectors and startup code.
    To access the upper bank you need addresses of 17 bit (actually 24) and all the code must be compiled in the so called "large model".
    So the point that the full library cannot fit into neither the lower bank, nor the upper bank, whatever size my code is, unless it is modulare and compiled in lasge model, so can stay in the lower bank overflowing to the upper bank.
    Hope this clarify the question.
    Regards.
    Mau.

    Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist