logo elektroda
logo elektroda
X
logo elektroda

NiceMCU XH-WB3S BK7238 Flashing, Testing, Pinout, Development, Porting

divadiow 8460 244
ADVERTISEMENT
  • #241 21641874
    insmod
    Level 26  
    >>21641862
    Yes, see https://github.com/openshwprojects/OpenBK7231T_App/issues/1769

    Added after 1 [hours] 42 [minutes]:

    3.0.78 builds
    https://github.com/NonPIayerCharacter/OpenBK7231T_App/actions/runs/17167633393
    Used BK7231N wpa supplicant for BK7231U/T and BK7252.
    BK7231T works with it.
    Last release - 510kb. This one - 497kb

    Removed wolfssl dependency from original libs with ar -d
    Size increased by 1792 bytes, but there would be no hidden surprises that way.
    A bug i've seen - on every seconds timer triggered several times instantly during OTA
    Info:MAIN:Time 2021, idle 142052/s, free 88000, MQTT 0(105), bWifi 1, secondsWithNoPing -1, socks 3/24 
    Info:MAIN:Time 2022, idle 116612/s, free 88000, MQTT 0(105), bWifi 1, secondsWithNoPing -1, socks 3/24 
    Info:MAIN:Time 2023, idle 1698/s, free 88000, MQTT 0(105), bWifi 1, secondsWithNoPing -1, socks 3/24 
    Info:MAIN:Time 2024, idle 1315/s, free 88000, MQTT 0(105), bWifi 1, secondsWithNoPing -1, socks 3/24 
    Info:MAIN:Time 2025, idle 98963/s, free 88000, MQTT 0(105), bWifi 1, secondsWithNoPing -1, socks 3/24 
    Info:MAIN:Time 2026, idle 135908/s, free 88000, MQTT 0(105), bWifi 1, secondsWithNoPing -1, socks 3/24 
    Info:MAIN:Time 2027, idle 136134/s, free 88000, MQTT 0(105), bWifi 1, secondsWithNoPing -1, socks 3/24 
    


    Added after 9 [minutes]:

    @divadiow
    There is a 'bug' in your beken_freertos_sdk_release repo.
    Since you probably just unpacked newer version on top of the older one (like i did for mine), some files that were deleted/moved remained.
    I've had build error with BK7252, because audio_pub.h was in two folders at once, and older version was included.
    Older: https://github.com/divadiow/beken_freertos_sd...blob/3.0.78/beken378/driver/audio/audio_pub.h
    Latest: https://github.com/divadiow/beken_freertos_sd...ob/3.0.78/beken378/driver/include/audio_pub.h
  • ADVERTISEMENT
  • #242 21642035
    divadiow
    Level 35  
    insmod wrote:
    There is a 'bug' in your beken_freertos_sdk_release repo.
    Since you probably just unpacked newer version on top of the older one (like i did for mine), some files that were deleted/moved remained.


    damn yes. I was after a nice way to see the differences between versions but actually the correct way would have been to delete the lot between branches? Hmm.

    Added after 57 [minutes]:

    Anyway, anything caught your interest in .78 vs .76?
  • ADVERTISEMENT
  • #243 21642058
    insmod
    Level 26  
    >>21642035
    It became possible to use mbedtls exclusively (without wolfssl) on BK7231U/T and BK7252.
    That reduced binary size significantly.
    Plus an idea came to me to play with mbedtls config. I removed some unneeded things to cut binary size.
    Plus i tried mbedtls 2.27.0 (default is 2.6.0). Binary size was increased some, but there were more free heap, + there were more idle cycles (?) (from 140-150k to ~170k).
  • ADVERTISEMENT
  • #244 21642253
    divadiow
    Level 35  
    insmod wrote:
    Plus fixed UART.

    _3.0.78_72c0170f2c72

    yay. maybe i can finish soil sensor


    Person holding an electronic circuit board with a soil sensor prototype.
  • #245 21642257
    p.kaczmarek2
    Moderator Smart Home
    Great! @insmod , a question - I didn't do SSL on LWIP on any of the platforms yet, so far I only used HTTPS on ESP, but now I am wondering... would it be possible to move SSL to shared app, like you did with mqtt.c? I don't know currently how SSL is done under the hood, but isn't it just relying on LWIP raw TCP sockets, nothing more? Wouldn't it be possible to have SSL added to obk shared app once and have it working for all platforms (if enabled)?
    Helpful post? Buy me a coffee.

Topic summary

The discussion centers on the NiceMCU XH-WB3S development board featuring the BK7238 SoC, initially suspected to be BK7231T but confirmed as BK7238. Users share experiences with flashing, testing, and porting firmware, including challenges with encryption keys, flash IDs, and bootloader compatibility. The BK7238 uses 2MB flash with varying encryption keys per chip, complicating universal firmware flashing. Tools like BKFIL and Easy Flasher (EF) are used for backup and restore, with EF supporting full flash erase and restore including bootloader. Flash ID support was extended to include missing flash chips to avoid CRC errors. Arduino SDK and Beken FreeRTOS SDK (version 3.0.70.1 and newer 3.0.76) are referenced for development, with partial support for BK7238 and related chips (BK7231N, BK7231U, BK7252). Porting efforts include adapting delay functions for 160MHz BK7238, resolving flashvars alignment issues due to 64-bit time_t, and addressing HTTP server and TCP socket stability problems in LWIP. OTA updates are functional but require correct image types and bootloader versions. Power save modes and their impact on peripherals like BL0937 energy meter and DS18B20 sensors are discussed, with some instability noted under power save. SPI flashing and UART flashing methods are compared, with SPI preferred for some devices. BK7231U (CC8000 chip) support is emerging, with builds available but some undefined references and boot issues. BK7252 camera module support is experimental, with encrypted flash complicating firmware use. Users report issues with DS18B20 sensor timing on BK7238 due to delay_us inaccuracies, partially fixed by new SDK delay implementations. Logging and MQTT load affect system stability and sensor reading consistency. The community shares flash dumps, toolchain links, and SDK forks to aid development and testing. Overall, the thread provides detailed technical insights into BK7238-based NiceMCU boards' flashing, SDK porting, peripheral support, and firmware development challenges and progress.
Summary generated by the language model.
ADVERTISEMENT