For any app use headers from hal, CONFIG_CHIP_NAME=BL602 needs to be exported so the compile script can find the correct components.
By default, it links with link script flash.ld which does not have informaiton to link against wifi lib. To compile wifi, the flash_rom.ld needs to be selected with CONFIG_LINK_ROM=1
Q1: With the define, SDK is able to support different chip.
Q2: wifi lib is controlled by the component name, bl602_wifi, in the Makefile. CONFIG_LINK_ROM is used to link the rom code, and ignore flash.ld please.
For any app use headers from hal,
CONFIG_CHIP_NAME=BL602
needs to be exported so the compile script can find the correct components.By default, it links with link script flash.ld which does not have informaiton to link against wifi lib. To compile wifi, the
flash_rom.ld
needs to be selected withCONFIG_LINK_ROM=1