Has WICED_Bluetooth_Firmware_Driver_for_BCM43438A1 been deliberately moved to RAM in WICED 6.1

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

cross mob
Anonymous
Not applicable

I am building the ble_hello_sensor snip for the BCM94343WWCD1 in the 6.1 and 6.0 WICED SDKs The console window build summary is listed below for each SDK. As you can see in WICED 6.1 most of the flash values are missing.  That's probably a mistake...

An interesting thing is that the WICED_Bluetooth_Firmware_Driver which is about 36 kB in size is located in RAM in SDK 6.1 but it was located in flash in 6.0.

This seems to be the way the build is configured.  When I build our Wi-Fi / BLE application that runs fine on SDK 6.0 it does not have enough RAM on SDK 6.1 even though no platform, source or config files were changed between the two.

As you can see the same application uses 36 k more RAM in 6.1 than it did in 6.0

SDK 6.1 snip.bluetooth.ble_hello_sensor-BCM94343WWCD1-ThreadX-NetX-SDIO

----------------------------------|---------|---------|

                                  |         |  Static |

              Module              | Flash   |   RAM   |

----------------------------------+---------+---------|

Bluetooth_Embedded_Low_Energy_Stac|       0 |     57  |

bluetooth_low_energy              |       0 |    9248 |

Host MCU-family library           |       0 |     376 |

Interrupt Vectors                 |       0 |       0 |

libc                              |       0 |    3064 |

Other                             |       0 |     275 |

platform                          |       0 |     292 |

RAM Initialisation                |   39580 |       0 |

Ring_Buffer                       |       0 |       0 |

Startup Stack & Link Script fill  |       0 |       7 |

ThreadX                           |       0 |     400 |

WICED                             |       0 |     862 |

WICED_Bluetooth_Firmware_Driver_fo|       0 |   36987 |

WWD                               |       0 |      60 |

----------------------------------+---------+---------|

TOTAL (bytes)                     |       0 |   51628 |

----------------------------------|---------|---------|

SDK 6.0 snip.bluetooth.ble_hello_sensor-BCM94343WWCD1-ThreadX-NetX-SDIO

----------------------------------|---------|---------|

                                  |         |  Static |

              Module              | Flash   |     RAM |

----------------------------------+---------+---------|

Bluetooth_Embedded_Low_Energy_Stac|     164 |      64 |

bluetooth_low_energy              |   78302 |    9308 |

Host MCU-family library           |    8214 |     376 |

Interrupt Vectors                 |     388 |       0 |

libc                              |   30068 |    3064 |

Other                             |    3245 |     271 |

platform                          |    1364 |     292 |

RAM Initialisation                |    2596 |       0 |

Ring_Buffer                       |     112 |       0 |

Startup Stack & Link Script fill  |       0 |       7 |

ThreadX                           |    7048 |     396 |

WICED                             |    2103 |     854 |

WICED_Bluetooth_Firmware_Driver_fo|   36691 |       0 |

WWD                               |     677 |      60 |

----------------------------------+---------+---------|

TOTAL (bytes)                     |  168376 |   14692 |

----------------------------------|---------|---------|

0 Likes
1 Solution
RaktimR_11
Moderator
Moderator
Moderator
500 replies posted 250 replies posted 100 replies posted

Like I said, this will be properly resolved in the upcoming release. In the meantime, please use the attached map_parse_gcc.pl as located in 43xxx_Wi-Fi>tools>mapfile_parser>map_parse_gcc.pl.

pastedImage_1.png

My previous comment was just for the bluetooth firmware part.

View solution in original post

7 Replies
RaktimR_11
Moderator
Moderator
Moderator
500 replies posted 250 replies posted 100 replies posted

Thanks for bringing it to our notice. As part of the 6.1 release, there was a bug-fix to the firmware and inadvertently 'const' was left out when generating the firmware memory buffer from the HCD file. This resulted in the entire firmware residing in RAM instead of flash.  This will be fixed in the upcoming releases of WICED Studio. For now, please prefix 'const' to brcm_patchram_buf in

43xxx_Wi-Fi/libraries/drivers/bluetooth/firmware/43438A1/26MHz/bt_firmware_controller.c and

43xxx_Wi-Fi/libraries/drivers/bluetooth/firmware/43438A1/37_4MHz/bt_firmware_controller.c, as follows:

const unsigned char brcm_patchram_buf[] =

pastedImage_0.png

0 Likes
Anonymous
Not applicable

Hi,

I get the same issue at BCM43340.

Please check it.

Thanks.

/WICED-Studio-6.1/43xxx_Wi-Fi

$ ./make test.console-BCM943340WCD1-FreeRTOS-LwIP

MAKEFILE MAKECMDGOALS=test.console-BCM943340WCD1-FreeRTOS-LwIP OTA2_SUPPORT is disabled

Applying changes made to: Makefile

test.console-BCM943340WCD1-FreeRTOS-LwIP

----------------------------------|---------|---------|

                                  |         |  Static |

              Module              |  Flash  |   RAM   |

----------------------------------+---------+---------|

App                               |       0 |    2688 |

command_console                   |       0 |     200 |

command_console_mallinfo          |       0 |       0 |

command_console_ping              |       0 |       2 |

command_console_platform          |       0 |       0 |

command_console_thread            |       0 |      22 |

command_console_wifi              |       0 |     464 |

command_console_WPS               |       0 |       4 |

crc                               |       0 |       0 |

DHCP_Server                       |       0 |     131 |

DNS                               |       0 |      44 |

FreeRTOS                          |       0 |     444 |

Host MCU-family library           |       0 |    2388 |

Interrupt Vectors                 |       0 |       0 |

iperf                             |       0 |     168 |

libc                              |       0 |    3396 |

LwIP                              |       0 |    3858 |

mbedTLS                           |       0 |       0 |

Networking                        |       0 |     692 |

Other                             |       0 |       0 |

Packet Buffers                    |       0 |   57768 |

platform                          |       0 |      60 |

RAM Initialisation                |    2840 |       0 |

resources                         |       0 |       0 |

Ring_Buffer                       |       0 |       0 |

Startup Stack & Link Script fill  |       0 |      74 |

Supplicant - BESL                 |       0 |      48 |

TLV                               |       0 |       0 |

WICED                             |       0 |     796 |

wiced_log                         |       0 |    1056 |

wifi_utils                        |       0 |      33 |

WWD                               |       0 |     456 |

----------------------------------+---------+---------|

TOTAL (bytes)                     |       0 |   74792 |

----------------------------------|---------|---------|

Build complete

Making .gdbinit

0 Likes
RaktimR_11
Moderator
Moderator
Moderator
500 replies posted 250 replies posted 100 replies posted

Like I said, this will be properly resolved in the upcoming release. In the meantime, please use the attached map_parse_gcc.pl as located in 43xxx_Wi-Fi>tools>mapfile_parser>map_parse_gcc.pl.

pastedImage_1.png

My previous comment was just for the bluetooth firmware part.

ew
Level 2
Level 2
First like received Welcome!

rroy wrote:

Thanks for bringing it to our notice. As part of the 6.1 release, there was a bug-fix to the firmware and inadvertently 'const' was left out when generating the firmware memory buffer from the HCD file. This resulted in the entire firmware residing in RAM instead of flash.  This will be fixed in the upcoming releases of WICED Studio. For now, please prefix 'const' to brcm_patchram_buf in

43xxx_Wi-Fi/libraries/drivers/bluetooth/firmware/43438A1/26MHz/bt_firmware_controller.c and

43xxx_Wi-Fi/libraries/drivers/bluetooth/firmware/43438A1/37_4MHz/bt_firmware_controller.c, as follows:

const unsigned char brcm_patchram_buf[] =

Hi Roy

SDK 6.2 was just released, but the bug (missing 'const') is still there !!!

Why don't you pay more attention when you make new releases ?

EW

Anonymous
Not applicable

rroy

I submitted the original bug report.  I downloaded the 6.2 SDK.  I can confirm that this bug is still there. The extra 35 k of RAM means that users are unable to run the demo application for our board.

rashc_2727106
Level 4
Level 4
10 likes received First like received First like given

FWIW I actually needed BOTH changes mentioned in this thread (adding const.pl in the bluetooth driver files and using the provided map_parse_gcc.pl) in order to get the RAM use back to where it should be with 6.1. 

Just mentioning it here in case it saves anyone else some grief, since it wasn't originally clear to me as only the map_parse_gcc.pl change was marked as the "correct answer".