makefile.mk keywords / syntax

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
StN__1917156
Level 4
Level 4
25 replies posted 10 replies posted 5 replies posted

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

0 Likes
1 Solution

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

View solution in original post

0 Likes
3 Replies
SheetalJ
Moderator
Moderator
Moderator
First comment on KBA 750 replies posted 500 likes received

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.

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

0 Likes

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

0 Likes