3 Replies Latest reply on Jul 25, 2019 3:13 PM by StN._1917156

    makefile.mk keywords / syntax

    StN._1917156

      Could you give a link to document where can see all the keywords/syntax available for makefile.mk as the only one posting I found is for WiFi/ Combo: https://community.cypress.com/thread/8613?start=0&tstart=0  and is not quite applicable for WICED 6.2.1 +   BT / CYW20719?

      I'm currently interested is there option to add whole directory as a source for *.c files instead to add every one with separate records like APP_SRC += hello_sensor.c

      Thanks

        • 1. Re: makefile.mk keywords / syntax
          SheetalJ_96

          Hi,

           

          Yes you can add directory in makefile in following way-

          SDK_INC_FLAGS              :=../include/ ../../common/include/ ../include/platforms/$(PLATFORM)/ ../include/Drivers/ ../include/Drivers/$(CHIP)

           

          Please refer /20719-B1_Bluetooth/Makefile and also, WICED make file as you mentioned.

          1 of 1 people found this helpful
          • 2. Re: makefile.mk keywords / syntax
            StN._1917156

            I'm trying to port u8g2 to CYW20719 and as soon as I try to use u8g2_SetFont(..) and I'm getting:

             

            Linking target ELF

            ..\..\43xxx_Wi-Fi\tools\ARM_GNU\Win32\bin\arm-none-eabi-ld: ../build/bsc01-CYBT_413034_EVAL-rom-ram-Wiced-release/A_20719B1-bsc01-rom-ram-spar.elf section `.rodata' will not fit in region `ram'

            ..\..\43xxx_Wi-Fi\tools\ARM_GNU\Win32\bin\arm-none-eabi-ld: region `ram' overflowed by 126956 bytes

             

            So those are the flags that I have to include in the make file to avoid this according to  this olikraus posting :

            -ffunction-sections -fdata-sections

            and

            -Wl,--gc-sections

             

            But the syntax in the WICED makefile.mk quite differs from the example :

            COMMON_FLAGS += -ffunction-sections -fdata-sections

            GC:=-Wl,--gc-sections -Wl,--undefined=arm_stack_area -Wl,--undefined=__isr_vector

             

            So will appreciate some help on:

            1. is COMMON_FLAGS  same as C_FLAGS and if not how to add -ffunction-sections -fdata-sections ?

            2. how to add -Wl,--gc-sections flags?

            Thanks

            • 3. Re: makefile.mk keywords / syntax
              StN._1917156

              So

              C_FLAGS += -ffunction-sections -fdata-sections

              works fine.

              Adding C_FLAGS += -Wl,--gc-sections doesnt change neither RAM footprint nor OTA inage,.

              The code work fine so far, not sure only I add last flags the proper way