BC660K-GL flashed with custom firmware give strange output

Hi,

I’m taking my first steps with QuecOpen.
My goal is to make a NB-IoT version of one of our Sigfox sensor.

As a first try, I compiled and build example_gpio sample from the SDK and tried to flashed a custom board I made, equiped with a BC660K-GL module.

Note : my custom board seems to be fully functionnal with the original firmware. All the AT commands are responding correctly.

Flashing the module with the custom firmware is not a problem. But when I reset it, debug UART give me some strange outputs :

[2022-11-30_18:13:13:324]boot rom try normal boot start!
[2022-11-30_18:13:13:324] AUDPSProcedure 4.0
[2022-11-30_18:13:13:338]Fota base: 0x2d0000
[2022-11-30_18:13:13:338]adups_IsPartPackge
[2022-11-30_18:13:13:338]ÿÿÿÿÿ
[2022-11-30_18:13:13:338]adups_IsPartPackge: NO!
[2022-11-30_18:13:13:338]adups Packge: not found!
[2022-11-30_18:13:13:338]bootloader try normal boot system start!
[2022-11-30_18:13:13:338]LoadVerifyImageHead read(len=272), Time(ms)->0.
[2022-11-30_18:13:13:338]test:VerifyImageHead skip
[2022-11-30_18:13:13:338]VerifyImageBody sha256 skip
[2022-11-30_18:13:13:387]boot rom try download from uart start!
[2022-11-30_18:13:13:387] download not success( 0x96)
[2022-11-30_18:13:29:386] boot rom try download from uart start!
[2022-11-30_18:13:29:386] download not success( 0x96)
[2022-11-30_18:13:45:392] boot rom try download from uart start!
[2022-11-30_18:13:45:392] download not success( 0x96)
[2022-11-30_18:14:01:399] boot rom try download from uart start!
[2022-11-30_18:14:01:399] download not success( 0x96)
[2022-11-30_18:14:17:407] boot rom try download from uart start!

Of course, the led connected on GPIO1 does not blink.

I cannot find any information about these messages.
Is there any thing I made wrong ?

Any help would be appreciated :wink:

Thanks

Johann

I suggest you first debug and test according to the relevant instructions and examples provided by us

example_gpio is an example you provided.

Can you tell me what is wrong from the debug output ?

Please check whether the BOOT pull continuously lowered. If yes, the download will be affected

Thanks.

I don’t think the BOOT pull is concerned since the module works correctly when flashed with the original BC660K-GL firmware.

The log in my first message was incorrect. Bellow is the output I receive on debug UART when I reset the module after flashing it with my own firmware :

[2022-12-01_13:06:22:933]boot rom try normal boot start!
[2022-12-01_13:06:22:933] AUDPSProcedure 4.0
[2022-12-01_13:06:22:957]Fota base: 0x2d0000
[2022-12-01_13:06:22:957]adups_IsPartPackge
[2022-12-01_13:06:22:957]ÿÿÿÿÿ
[2022-12-01_13:06:22:957]adups_IsPartPackge: NO!
[2022-12-01_13:06:22:957]adups Packge: not found!
[2022-12-01_13:06:22:957]bootloader try normal boot system start!
[2022-12-01_13:06:22:957]LoadVerifyImageHead read(len=272), Time(ms)->0.
[2022-12-01_13:06:22:957]test:VerifyImageHead skip
[2022-12-01_13:06:22:957]VerifyImageBody sha256 skip

Do you see something ?

I flash my custom firmware (example_gpio) on a official Quectel BC660K-GL Evaluation board.
Output debug is the same :

[2022-12-01_14:42:29:642]boot rom try normal boot start!
[2022-12-01_14:42:29:642] AUDPSProcedure 4.0
[2022-12-01_14:42:29:642]Fota base: 0x2d0000
[2022-12-01_14:42:29:642]adups_IsPartPackge
[2022-12-01_14:42:29:642]ÿÿÿÿÿ
[2022-12-01_14:42:29:642]adups_IsPartPackge: NO!
[2022-12-01_14:42:29:642]adups Packge: not found!
[2022-12-01_14:42:29:642]bootloader try normal boot system start!
[2022-12-01_14:42:29:642]LoadVerifyImageHead read(len=272), Time(ms)->0.
[2022-12-01_14:42:29:659]test:VerifyImageHead skip
[2022-12-01_14:42:29:659]VerifyImageBody sha256 skip

Forgot to mention that the output above is printed continuously on debug uart.

It’s look like a boot loop.

May be the firmware target is incorrect ?

Is it possible my toolchain is not correctly configured for BC660K-GL ?

The output is a normal log about the initialization of the debug port. Please continue to view and debug the log through the main serial port

Thank you for this information.
Indeed, my compiled firmware and the original BC660 firmware outputs are the same.

Everything works fine when the module is flashed with BC660 firmware. I can use it throught the main uart.

But when the module is flashed with my firmware (I used example from BC660 QuecOpen Quick Start Guide), I don’t see anything on the main uart because the module is stuck in a boot loop :

[2022-12-05_11:15:55:031]boot rom try normal boot start!
[2022-12-05_11:15:55:031] AUDPSProcedure 4.0
[2022-12-05_11:15:55:053]Fota base: 0x2d0000
[2022-12-05_11:15:55:053]adups_IsPartPackge
[2022-12-05_11:15:55:053]ÿÿÿÿÿ
[2022-12-05_11:15:55:053]adups_IsPartPackge: NO!
[2022-12-05_11:15:55:053]adups Packge: not found!
[2022-12-05_11:15:55:053]bootloader try normal boot system start!
[2022-12-05_11:15:55:053]LoadVerifyImageHead read(len=272), Time(ms)->0.
[2022-12-05_11:15:55:053]test:VerifyImageHead skip
[2022-12-05_11:15:55:053]VerifyImageBody sha256 skip

[2022-12-05_11:15:55:092]boot rom try normal boot start!
[2022-12-05_11:15:55:092] AUDPSProcedure 4.0
[2022-12-05_11:15:55:110]Fota base: 0x2d0000
[2022-12-05_11:15:55:110]adups_IsPartPackge
[2022-12-05_11:15:55:110]ÿÿÿÿÿ
[2022-12-05_11:15:55:110]adups_IsPartPackge: NO!
[2022-12-05_11:15:55:110]adups Packge: not found!
[2022-12-05_11:15:55:110]bootloader try normal boot system start!
[2022-12-05_11:15:55:110]LoadVerifyImageHead read(len=272), Time(ms)->0.
[2022-12-05_11:15:55:110]test:VerifyImageHead skip
[2022-12-05_11:15:55:110]VerifyImageBody sha256 skip

[2022-12-05_11:15:55:138]boot rom try normal boot start!
[2022-12-05_11:15:55:138] AUDPSProcedure 4.0
[2022-12-05_11:15:55:165]Fota base: 0x2d0000
[2022-12-05_11:15:55:165]adups_IsPartPackge
[2022-12-05_11:15:55:165]ÿÿÿÿÿ
[2022-12-05_11:15:55:165]adups_IsPartPackge: NO!
[2022-12-05_11:15:55:165]adups Packge: not found!
[2022-12-05_11:15:55:165]bootloader try normal boot system start!
[2022-12-05_11:15:55:165]LoadVerifyImageHead read(len=272), Time(ms)->0.
[2022-12-05_11:15:55:165]test:VerifyImageHead skip
[2022-12-05_11:15:55:165]VerifyImageBody sha256 skip

[2022-12-05_11:15:55:200]boot rom try normal boot start!
[2022-12-05_11:15:55:200] AUDPSProcedure 4.0
[2022-12-05_11:15:55:222]Fota base: 0x2d0000
[2022-12-05_11:15:55:222]adups_IsPartPackge
[2022-12-05_11:15:55:222]ÿÿÿÿÿ
[2022-12-05_11:15:55:222]adups_IsPartPackge: NO!
[2022-12-05_11:15:55:222]adups Packge: not found!
[2022-12-05_11:15:55:222]bootloader try normal boot system start!
[2022-12-05_11:15:55:222]LoadVerifyImageHead read(len=272), Time(ms)->0.
[2022-12-05_11:15:55:222]test:VerifyImageHead skip
[2022-12-05_11:15:55:222]VerifyImageBody sha256 skip

[2022-12-05_11:15:55:260]boot rom try normal boot start!
[2022-12-05_11:15:55:260] AUDPSProcedure 4.0
[2022-12-05_11:15:55:280]Fota base: 0x2d0000
[2022-12-05_11:15:55:280]adups_IsPartPackge
[2022-12-05_11:15:55:280]ÿÿÿÿÿ
[2022-12-05_11:15:55:280]adups_IsPartPackge: NO!
[2022-12-05_11:15:55:280]adups Packge: not found!
[2022-12-05_11:15:55:280]bootloader try normal boot system start!
[2022-12-05_11:15:55:280]LoadVerifyImageHead read(len=272), Time(ms)->0.
[2022-12-05_11:15:55:280]test:VerifyImageHead skip
[2022-12-05_11:15:55:280]VerifyImageBody sha256 skip

[2022-12-05_11:15:55:321]boot rom try normal boot start!
[2022-12-05_11:15:55:321] AUDPSProcedure 4.0
[2022-12-05_11:15:55:336]Fota base: 0x2d0000
[2022-12-05_11:15:55:336]adups_IsPartPackge
[2022-12-05_11:15:55:336]ÿÿÿÿÿ
[2022-12-05_11:15:55:336]adups_IsPartPackge: NO!
[2022-12-05_11:15:55:336]adups Packge: not found!
[2022-12-05_11:15:55:336]bootloader try normal boot system start!
[2022-12-05_11:15:55:336]LoadVerifyImageHead read(len=272), Time(ms)->0.
[2022-12-05_11:15:55:336]test:VerifyImageHead skip
[2022-12-05_11:15:55:336]VerifyImageBody sha256 skip

[2022-12-05_11:15:55:366]boot rom try normal boot start!
[2022-12-05_11:15:55:366] AUDPSProcedure 4.0
[2022-12-05_11:15:55:392]Fota base: 0x2d0000
[2022-12-05_11:15:55:392]adups_IsPartPackge
[2022-12-05_11:15:55:392]ÿÿÿÿÿ
[2022-12-05_11:15:55:392]adups_IsPartPackge: NO!
[2022-12-05_11:15:55:392]adups Packge: not found!
[2022-12-05_11:15:55:392]bootloader try normal boot system start!
[2022-12-05_11:15:55:392]LoadVerifyImageHead read(len=272), Time(ms)->0.
[2022-12-05_11:15:55:392]test:VerifyImageHead skip
[2022-12-05_11:15:55:392]VerifyImageBody sha256 skip

[2022-12-05_11:15:55:444]boot rom try normal boot start!
[2022-12-05_11:15:55:444] AUDPSProcedure 4.0
[2022-12-05_11:15:55:449]Fota base: 0x2d0000
[2022-12-05_11:15:55:449]adups_IsPartPackge
[2022-12-05_11:15:55:449]ÿÿÿÿÿ
[2022-12-05_11:15:55:449]adups_IsPartPackge: NO!
[2022-12-05_11:15:55:449]adups Packge: not found!
[2022-12-05_11:15:55:449]bootloader try normal boot system start!
[2022-12-05_11:15:55:449]LoadVerifyImageHead read(len=272), Time(ms)->0.
[2022-12-05_11:15:55:449]test:VerifyImageHead skip
[2022-12-05_11:15:55:449]VerifyImageBody sha256 skip

[2022-12-05_11:15:55:490]boot rom try normal boot start!
[2022-12-05_11:15:55:490] AUDPSProcedure 4.0
[2022-12-05_11:15:55:506]Fota base: 0x2d0000
[2022-12-05_11:15:55:506]adups_IsPartPackge
[2022-12-05_11:15:55:506]ÿÿÿÿÿ
[2022-12-05_11:15:55:506]adups_IsPartPackge: NO!
[2022-12-05_11:15:55:506]adups Packge: not found!
[2022-12-05_11:15:55:506]bootloader try normal boot system start!
[2022-12-05_11:15:55:506]LoadVerifyImageHead read(len=272), Time(ms)->0.
[2022-12-05_11:15:55:506]test:VerifyImageHead skip
[2022-12-05_11:15:55:506]VerifyImageBody sha256 skip

[2022-12-05_11:15:55:553]boot rom try normal boot start!
[2022-12-05_11:15:55:553] AUDPSProcedure 4.0
[2022-12-05_11:15:55:563]Fota base: 0x2d0000
[2022-12-05_11:15:55:563]adups_IsPartPackge
[2022-12-05_11:15:55:563]ÿÿÿÿÿ
[2022-12-05_11:15:55:563]adups_IsPartPackge: NO!
[2022-12-05_11:15:55:563]adups Packge: not found!
[2022-12-05_11:15:55:563]bootloader try normal boot system start!
[2022-12-05_11:15:55:563]LoadVerifyImageHead read(len=272), Time(ms)->0.
[2022-12-05_11:15:55:563]test:VerifyImageHead skip
[2022-12-05_11:15:55:563]VerifyImageBody sha256 skip

[2022-12-05_11:15:55:598]boot rom try normal boot start!
[2022-12-05_11:15:55:598] AUDPSProcedure 4.0
[2022-12-05_11:15:55:619]Fota base: 0x2d0000
[2022-12-05_11:15:55:619]adups_IsPartPackge
[2022-12-05_11:15:55:619]ÿÿÿÿÿ
[2022-12-05_11:15:55:619]adups_IsPartPackge: NO!
[2022-12-05_11:15:55:619]adups Packge: not found!
[2022-12-05_11:15:55:619]bootloader try normal boot system start!
[2022-12-05_11:15:55:619]LoadVerifyImageHead read(len=272), Time(ms)->0.
[2022-12-05_11:15:55:619]test:VerifyImageHead skip
[2022-12-05_11:15:55:619]VerifyImageBody sha256 skip

[2022-12-05_11:15:55:659]boot rom try normal boot start!
[2022-12-05_11:15:55:659] AUDPSProcedure 4.0
[2022-12-05_11:15:55:679]Fota base: 0x2d0000
[2022-12-05_11:15:55:679]adups_IsPartPackge
[2022-12-05_11:15:55:679]ÿÿÿÿÿ
[2022-12-05_11:15:55:679]adups_IsPartPackge: NO!
[2022-12-05_11:15:55:679]adups Packge: not found!
[2022-12-05_11:15:55:679]bootloader try normal boot system start!
[2022-12-05_11:15:55:679]LoadVerifyImageHead read(len=272), Time(ms)->0.
[2022-12-05_11:15:55:679]test:VerifyImageHead skip
[2022-12-05_11:15:55:679]VerifyImageBody sha2

It’s the reason why I doubt about the correct firmware target or something about the build.

C:\QuecOpen\PLAT>gccmake.bat clean
build.bat version 20180330
GCCLIB_PATH: "C:/gcc"
OPTION: clean
(cd project/qcx212_0h00/quectel_project/quec_open && make -f Makefile clean)
make[1]: Entering directory '/cygdrive/c/QuecOpen/PLAT/project/qcx212_0h00/quectel_project/quec_open'
make[1]: Leaving directory '/cygdrive/c/QuecOpen/PLAT/project/qcx212_0h00/quectel_project/quec_open'
-------------------
clean finished.
-------------------

C:\QuecOpen\PLAT>gccmake.bat all
build.bat version 20180330
GCCLIB_PATH: "C:/gcc"
Start time: 02/12/2022 19:08:42.48
    #################### STEP1: configuration #############################
configuration is successful
    #################### STEP2: make quectel_ocpu_app #####################
(cd project/qcx212_0h00/quectel_project/quec_open && make V= -f Makefile all)
make[1]: Entering directory '/cygdrive/c/QuecOpen/PLAT/project/qcx212_0h00/quectel_project/quec_open'
CC ../../../../../PLAT/project/qcx212_0h00/quectel_project/quec_open/customer/main.c
CC ../../../../../PLAT/project/qcx212_0h00/quectel_project/quec_open/customer/config/ql_task_def.c
CC ../../../../../PLAT/project/qcx212_0h00/quectel_project/quec_open/ril/src/ril_util.c
CC ../../../../../PLAT/project/qcx212_0h00/quectel_project/quec_open/ril/src/ril_urc.c
CC ../../../../../PLAT/project/qcx212_0h00/quectel_project/quec_open/ril/src/ril_dfota.c
CC ../../../../../PLAT/project/qcx212_0h00/quectel_project/quec_open/ril/src/ril_network.c
CC ../../../../../PLAT/project/qcx212_0h00/quectel_project/quec_open/ril/src/ril_ntp.c
CC ../../../../../PLAT/project/qcx212_0h00/quectel_project/quec_open/ril/src/ril_system.c
CC ../../../../../PLAT/project/qcx212_0h00/quectel_project/quec_open/ril/src/ril_mqtt.c
CC ../../../../../PLAT/project/qcx212_0h00/quectel_project/quec_open/example/example_lwip_tcpclient.c
CC ../../../../../PLAT/project/qcx212_0h00/quectel_project/quec_open/example/example_ps.c
CC ../../../../../PLAT/project/qcx212_0h00/quectel_project/quec_open/example/example_multitask.c
CC ../../../../../PLAT/project/qcx212_0h00/quectel_project/quec_open/example/example_gpio.c
CC ../../../../../PLAT/project/qcx212_0h00/quectel_project/quec_open/example/example_spi.c
CC ../../../../../PLAT/project/qcx212_0h00/quectel_project/quec_open/example/example_adc.c
CC ../../../../../PLAT/project/qcx212_0h00/quectel_project/quec_open/example/example_fs.c
CC ../../../../../PLAT/project/qcx212_0h00/quectel_project/quec_open/example/example_dfota_http.c
CC ../../../../../PLAT/project/qcx212_0h00/quectel_project/quec_open/example/example_lwip_udpclient.c
CC ../../../../../PLAT/project/qcx212_0h00/quectel_project/quec_open/example/example_time.c
CC ../../../../../PLAT/project/qcx212_0h00/quectel_project/quec_open/example/example_pwm.c
CC ../../../../../PLAT/project/qcx212_0h00/quectel_project/quec_open/example/example_float_math.c
CC ../../../../../PLAT/project/qcx212_0h00/quectel_project/quec_open/example/example_timer.c
CC ../../../../../PLAT/project/qcx212_0h00/quectel_project/quec_open/example/example_mqtt.c
CC ../../../../../PLAT/project/qcx212_0h00/quectel_project/quec_open/example/example_i2c.c
CC ../../../../../PLAT/project/qcx212_0h00/quectel_project/quec_open/example/example_rtc.c
CC ../../../../../PLAT/project/qcx212_0h00/quectel_project/quec_open/example/example_eint.c
CC ../../../../../PLAT/os/freertos/src/timers.c
CC ../../../../../PLAT/os/freertos/src/tasks.c
CC ../../../../../PLAT/os/freertos/src/event_groups.c
CC ../../../../../PLAT/os/freertos/src/list.c
CC ../../../../../PLAT/os/freertos/src/queue.c
CC ../../../../../PLAT/os/freertos/src/heap_4.c
CC ../../../../../PLAT/os/freertos/CMSIS/src/os_systick.c
CC ../../../../../PLAT/os/freertos/CMSIS/src/os_callback_hook.c
CC ../../../../../PLAT/os/freertos/CMSIS/src/mm_debug.c
CC ../../../../../PLAT/os/freertos/CMSIS/src/cmsis_os2.c
CC ../../../../../PLAT/os/freertos/portable/gcc/port.c
LINK ../../../../../PLAT/gccout/APPNB5MDM32A01.elf
Memory region         Used Size  Region Size  %age Used
LOAD_IRAM_MCUVECTOR:         100 B        100 B    100.00%
   LOAD_IRAM_MCU:        4116 B       5020 B     81.99%
UNLOAD_DRAM_USRNV:          1 KB         1 KB    100.00%
   LOAD_DRAM_MCU:          48 B         4 KB      1.17%
UNLOAD_DRAM_PSPHYRET:          6 KB         6 KB    100.00%
       LOAD_IRAM:       35796 B        36 KB     97.10%
LOAD_DRAM_SHARED:      121888 B       152 KB     78.31%
   LOAD_DRAM_BSP:        3884 B         8 KB     47.41%
UNLOAD_DRAM_FLASHMEM:          7 KB         7 KB    100.00%
UNLOAD_DRAM_SLPMEM:         224 B        992 B     22.58%
       FLASH_APP:     2385296 B      2560 KB     90.99%
OBJCOPY ../../../../../PLAT/gccout/APPNB5MDM32A01.bin
   text    data     bss     dec     hex filename
2378091    7196  133184 2518471  266dc7 ../../../../../PLAT/gccout/APPNB5MDM32A01.elf
mv  ../../../../../PLAT/gccout/*.elf ../../../../../PLAT/gccout/APPNB5MDM32A01/dbg
mv  ../../../../../PLAT/gccout/*.map ../../../../../PLAT/gccout/APPNB5MDM32A01/dbg
mv  ../../../../../PLAT/gccout/*.symbols ../../../../../PLAT/gccout/APPNB5MDM32A01/dbg
mv  ../../../../../PLAT/gccout/*.txt ../../../../../PLAT/gccout/APPNB5MDM32A01/dbg
cp  ../../../../../PLAT/gccout/*.bin ../../../../../PLAT/gccout/APPNB5MDM32A01
cp  ../../../../../PLAT/tools/flash_download.ini ../../../../../PLAT/gccout/APPNB5MDM32A01
cp  ../../../../../PLAT/tools/MergeRfTable.bin ../../../../../PLAT/gccout/APPNB5MDM32A01
cp  ../../../../../PLAT/tools/Bootloader.bin ../../../../../PLAT/gccout/APPNB5MDM32A01/Bootloader_APPNB5MDM32A01.bin
cp  ../../../../../PLAT/tools/comdb.txt ../../../../../PLAT/gccout/APPNB5MDM32A01
sed -i "s|bootloader.bin|Bootloader_APPNB5MDM32A01.bin|g" ../../../../../PLAT/gccout/APPNB5MDM32A01/flash_download.ini
sed -i "s|app.bin|APPNB5MDM32A01.bin|g" ../../../../../PLAT/gccout/APPNB5MDM32A01/flash_download.ini
mv  ../../../../../PLAT/gccout/*.bin ../../../../../PLAT/gccout/APPNB5MDM32A01
cp  ../../../../../PLAT/tools/flash_download.ini ../../../../../PLAT/gccout/APPNB5MDM32A01
cp  ../../../../../PLAT/tools/MergeRfTable.bin ../../../../../PLAT/gccout/APPNB5MDM32A01
cp  ../../../../../PLAT/tools/Bootloader.bin ../../../../../PLAT/gccout/APPNB5MDM32A01/Bootloader_APPNB5MDM32A01.bin
cp  ../../../../../PLAT/tools/comdb.txt ../../../../../PLAT/gccout/APPNB5MDM32A01
sed -i "s|bootloader.bin|Bootloader_APPNB5MDM32A01.bin|g" ../../../../../PLAT/gccout/APPNB5MDM32A01/flash_download.ini
sed -i "s|app.bin|APPNB5MDM32A01.bin|g" ../../../../../PLAT/gccout/APPNB5MDM32A01/flash_download.ini
make[1]: Leaving directory '/cygdrive/c/QuecOpen/PLAT/project/qcx212_0h00/quectel_project/quec_open'
    #######################################################################

---------- .\GCCOUT\OUTBUILDLOG.LOG
warning_num= 0, error_num= 0
.
End time: 02/12/2022 19:09:13.19
Built took 0 hours 0 minutes 31 seconds
--------------------------------------------------------------
- GCC Compiling Finished Sucessfully.
- The target image is in the 'gccout\APPNB5MDM32A01' directory.
--------------------------------------------------------------

C:\QuecOpen\PLAT>

Hi all,

I answered my own question. The toolchain I used was wrong. Now I use GNU Arm Embedded Toolchain v10.3-2021.10 from https://developer.arm.com/downloads/-/gnu-rm
Firmware is now built correctly and does not put my BC660 module in boot loop anymore.

Note for Quectel team : please update your Quick Start Guide (§4.1 Compiling Environment).

Last question : all my QuecOpen documentation is pretty old and marked as “preliminary”. Where can I download updates or last version of QuecOpen for BC660 ? Thanks

Johann

BC660K Quecopen related materials are in the SDK package, do you mean the latest version of SDK?

Yes, I mean the whole SDK.
Is there any update since the version I received on 2022-07 (BC660K-GL_QuecOpen_NB5_SDK_V1.0.zip) ?

So far, this is the only version, no other updates