Compile Fails when Adding BLE to EEPROM project

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

cross mob
MuNa_4652896
Level 4
Level 4
First like received First like given

I am using the Example project for PSoC 6 EEPROM (CE195313). I changed the device of the project to CYBLE-416045-02.

I edit the linker files to adjust the EEPROM Flash memory

for CM0:  em_eeprom         (rx)    : ORIGIN = 0x14000000, LENGTH = 0x4000

for CM4:  em_eeprom         (rx)    : ORIGIN = 0x14004000, LENGTH = 0x4000

Now I added BLE Component with All profiles hosted on CM4. Compiling fails!!

I am using PDL 3.1.0.

Generated_Source\PSoC6\pdl\middleware\ble\cy_ble.c:38:46: error: conflicting types for 'cy_ble_stackMemoryRam'

CY_ALIGN(sizeof(uint32_t)) CY_NOINIT uint8_t cy_ble_stackMemoryRam[CY_BLE_STACK_RAM_SIZE];

                                              ^

In file included from Generated_Source\PSoC6\pdl\middleware\ble\cy_ble_event_handler.h:21:0,

                 from Generated_Source\PSoC6\pdl\middleware\ble\cy_ble.c:16:

Generated_Source\PSoC6\pdl\middleware\ble\cy_ble.h:643:21: note: previous declaration of 'cy_ble_stackMemoryRam' was here

     extern uint8_t *cy_ble_stackMemoryRam;

                     ^

Generated_Source\PSoC6\pdl\middleware\ble\cy_ble.c: In function 'Cy_BLE_Init':

Generated_Source\PSoC6\pdl\middleware\ble\cy_ble.c:148:28: error: 'cy_stc_ble_config_t {aka struct <anonymous>}' has no member named 'callbackFunc'

         if(cy_ble_configPtr->callbackFunc != NULL)

                            ^

Generated_Source\PSoC6\pdl\middleware\ble\cy_ble.c:150:51: error: 'cy_stc_ble_config_t {aka struct <anonymous>}' has no member named 'callbackFunc'

             Cy_BLE_ApplCallback = cy_ble_configPtr->callbackFunc;

                                                   ^

Generated_Source\PSoC6\pdl\middleware\ble\cy_ble.c:152:9: error: 'cy_ble_eventHandlerFlag' undeclared (first use in this function)

         cy_ble_eventHandlerFlag = 0u;

         ^

Generated_Source\PSoC6\pdl\middleware\ble\cy_ble.c:152:9: note: each undeclared identifier is reported only once for each function it appears in

Generated_Source\PSoC6\pdl\middleware\ble\cy_ble.c:173:42: error: 'CY_BLE_ADVERTISING_FAST' undeclared (first use in this function)

         cy_ble_advertisingIntervalType = CY_BLE_ADVERTISING_FAST;

                                          ^

Generated_Source\PSoC6\pdl\middleware\ble\cy_ble.c:180:9: warning: implicit declaration of function 'Cy_BLE_ServiceInit' [-Wimplicit-function-declaration]

         Cy_BLE_ServiceInit();

         ^

Generated_Source\PSoC6\pdl\middleware\ble\cy_ble.c:183:9: error: 'cy_ble_pendingFlashWrite' undeclared (first use in this function)

         cy_ble_pendingFlashWrite = 0u;

         ^

Generated_Source\PSoC6\pdl\middleware\ble\cy_ble.c:184:22: error: 'cy_ble_peerBonding' undeclared (first use in this function)

The command 'arm-none-eabi-gcc.exe' failed with exit code '1'.

         (void)memset(cy_ble_peerBonding, (int8_t)CY_BLE_GAP_BONDING_NONE, sizeof(cy_ble_peerBonding));

                      ^

Generated_Source\PSoC6\pdl\middleware\ble\cy_ble.c: In function 'Cy_BLE_Enable':

Generated_Source\PSoC6\pdl\middleware\ble\cy_ble.c:296:80: error: 'cy_stc_ble_config_t {aka struct <anonymous>}' has no member named 'flashStorage'

             .bleStackFlashPointer            = (const uint8_t*)cy_ble_configPtr->flashStorage->stackFlashptr,

                                                                                ^

Generated_Source\PSoC6\pdl\middleware\ble\cy_ble.c:390:13: warning: implicit declaration of function 'Cy_BLE_SetState' [-Wimplicit-function-declaration]

             Cy_BLE_SetState(CY_BLE_STATE_INITIALIZING);

             ^

Generated_Source\PSoC6\pdl\middleware\ble\cy_ble.c:390:29: error: 'CY_BLE_STATE_INITIALIZING' undeclared (first use in this function)

             Cy_BLE_SetState(CY_BLE_STATE_INITIALIZING);

                             ^

Generated_Source\PSoC6\pdl\middleware\ble\cy_ble.c:393:27: error: 'cy_ble_connState' undeclared (first use in this function)

             (void)memset(&cy_ble_connState, 0, sizeof(cy_ble_connState));

                           ^

Generated_Source\PSoC6\pdl\middleware\ble\cy_ble.c:397:13: warning: implicit declaration of function 'Cy_BLE_SetAdvertisementState' [-Wimplicit-function-declaration]

             Cy_BLE_SetAdvertisementState(CY_BLE_ADV_STATE_STOPPED);

             ^

Generated_Source\PSoC6\pdl\middleware\ble\cy_ble.c:397:42: error: 'CY_BLE_ADV_STATE_STOPPED' undeclared (first use in this function)

             Cy_BLE_SetAdvertisementState(CY_BLE_ADV_STATE_STOPPED);

                                          ^

Generated_Source\PSoC6\pdl\middleware\ble\cy_ble.c: In function 'Cy_BLE_DeepSleepCallback':

Generated_Source\PSoC6\pdl\middleware\ble\cy_ble.c:795:16: warning: implicit declaration of function 'Cy_BLE_GetState' [-Wimplicit-function-declaration]

             if(Cy_BLE_GetState() == CY_BLE_STATE_INITIALIZING)

                ^

Generated_Source\PSoC6\pdl\middleware\ble\cy_ble.c:795:37: error: 'CY_BLE_STATE_INITIALIZING' undeclared (first use in this function)

             if(Cy_BLE_GetState() == CY_BLE_STATE_INITIALIZING)

How Can I fix this?

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.

Hello. I am sorry for the late reply, but it seems the problem is solved.

Can you please tell us why are you editing the linker files to adjust the EEPROM Flash memory manually?

I did that to overcome the problem of eeprom overlapping  error while compiling. So I split the eeprom regions. So each core has its own eeprom region.

Anyway, I uploaded the project for future references.

View solution in original post

0 Likes
2 Replies
VenkataD_41
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hi,

Can you please attach your project in which you are getting errors?

Can you please tell us why are you editing the linker files to adjust the EEPROM Flash memory manually?

Thanks

Ganesh

0 Likes
lock attach
Attachments are accessible only for community members.

Hello. I am sorry for the late reply, but it seems the problem is solved.

Can you please tell us why are you editing the linker files to adjust the EEPROM Flash memory manually?

I did that to overcome the problem of eeprom overlapping  error while compiling. So I split the eeprom regions. So each core has its own eeprom region.

Anyway, I uploaded the project for future references.

0 Likes