Tool/software:
Hello Experts,
I was porting our build to use the new SDK 1.0.0.3 release and noted an issue.
Setup:
CPU - AM6231 custom board
WLAN - CC3300
AM62X PSDK - 09.02.01.10
CC33XX SDK - 1.0.0.3
After including the updated source/patches/binaries to our Yocto build, I noted that the updated kernel module was rejecting the new cc33xx-conf.bin file.
root@host:~# dmesg |grep wlcore |grep -v -e "Processing message" -e "Reading control info" [ 13.583149] wlcore: cc33xx_probe :: Start [ 13.592413] wlcore: Wireless Driver Version 1.7.0.27 [ 13.592449] wlcore: WLAN CC33xx platform device probe done [ 13.628595] wlcore: Could not get nvs file ti-connectivity/cc33xx-nvs.bin [ 13.631366] wlcore: ERROR ti-connectivity/cc33xx-conf.bin configuration binary size is wrong, expected 981 got 1353 [ 13.668202] wlcore: WARNING falling back to default config [ 13.684158] wlcore: Chip wakeup [ 13.967361] wlcore: Set BLKsize to 128 [ 13.967505] wlcore: BOOT IRQs: 0x8 [ 13.967786] wlcore: Response len 704, allocated buffer len 712 [ 13.967791] wlcore: CMD# 35, len=712 [ 13.967798] wlcore: CC33XX device info: PG version: 2, Metal version: 0, Boot ROM version: 1 M3 ROM version: 1, MAC address: 0x3468b588b0d7, Device part number: 0 [ 13.967807] wlcore: Downloading ti-connectivity/cc33xx_2nd_loader.bin to device [ 14.071712] wlcore: Suspending IRQ while device reboots [ 14.177913] wlcore: Resuming IRQ [ 14.213018] wlcore: BOOT IRQs: 0x10 [ 14.215259] wlcore: ti-connectivity/cc33xx_2nd_loader.bin loaded successfully [ 14.215311] wlcore: Downloading ti-connectivity/cc33xx_fw.bin to device [ 15.041808] wlcore: Suspending IRQ while device reboots [ 15.148099] wlcore: Resuming IRQ [ 15.450720] wlcore: BOOT IRQs: 0x20 [ 15.450750] wlcore: ti-connectivity/cc33xx_fw.bin loaded successfully [ 15.450820] wlcore: WARNING flow control disable - BLE will not work [ 15.464104] wlcore: Downloading INI Params and Configurations to FW, INI Bin File Payload Length: 981 [ 15.464342] wlcore: ERROR FW is stuck, triggering recovery [ 17.492243] wlcore: Command T.O [ 17.492270] wlcore: CMD# 37, len=1000 [ 17.492281] wlcore: WARNING download INI params to FW command sending failed: -5 [ 17.527923] wlcore: ERROR FW download failed [ 17.563753] wlcore: wlcore_nvs_cb Complete
Example above shows that the kernel module is expecting a smaller conf file. I did note that there are more configs in this SDK version. After poking around I found that the conf.h file created by cc33xx_kernel.patch is the wrong version.
$ cd path/to/cc33xx/sdk/1.0.0.3 $ grep -r CC33XX_CONF_VERSION . ./cc33conf_src/conf.h:#define CC33XX_CONF_VERSION 0x01070070 ./cc33conf_src/cc33conf.h:#define DEFAULT_VERSION_SYMBOL "CC33XX_CONF_VERSION" ./patches/cc33xx_kernel.patch:+#define CC33XX_CONF_VERSION 0x01070050 ./patches/cc33xx_kernel.patch:+ header.version = cpu_to_le32(CC33XX_CONF_VERSION); $ hexdump -s 4 -n 4 -C cc33xx_rootfs/lib/firmware/ti-connectivity/cc33xx-conf.bin 00000004 70 00 07 01 |p...| 00000008
Example above shows a hint that the patch is creating the wrong conf.h file and confirms the CC33XX_CONF_VERSION used in the cc33xx-conf.bin file distributed in the SDK.
Things become even more clear when you diff the conf.h created by the patch and the conf.h distributed in cc33conf_src (ignoring type differences on variables).
To fix, I dropped the cc33conf_src/conf.h file into my kernel source tree and rebuilt. Everything worked fine.
I also ran into issues using cc33xxconf during troubleshooting, but I'll create another thread for that.