IronOS icon indicating copy to clipboard operation
IronOS copied to clipboard

[WiP] Pinecil V2

Open Ralim opened this issue 3 years ago • 6 comments

Pinecil V2 WiP.

Will need a little bit more cleanup and a squash merge as it overlaps with existing change sets a bit more too. Also some testing naturally.

ToDo:

  • [x] Test on Pinecil V2
  • [x] Refactor from placeholder name to PinecilV2
  • [x] Test on other models no regressions
  • [x] Update docs
  • [x] Add to CI

Not part of this PR:

  • [ ] BLE
  • [ ] Figure out how we want to do bootlogo?

Ralim avatar Jul 30 '22 07:07 Ralim

@discip Sorry to tag you into this, but iirc you have a model TS80 around. Annny chance you could give the build asset from this branch a test on your device before I merge as mine is currently in storage 👀

Ralim avatar Aug 02 '22 06:08 Ralim

@Ralim

Sorry to tag you into this

You have no reason to be sorry! 😃

I am even somewhat honored to be asked to help by the one who gave us this remarkable software complementing the already great hardware! 😊

Here are some observations for the TS80P:

  1. although the soldering state is entered and the timeout starts to count down, the wattage is 0.0 W and it does not heat
  2. does not negotiate for full potential no matter what PD timeout
stock wall plug Anker Nano II 45W
(PD No VBus) 5.1 V 6.5 V (has to be PPS)
  1. when tip is plugged / unplugged the main screen (not only visuals but also functional [buttons]) is only updated on power up even in debug mode RTip & CTip do not change
  2. as soon as explanatory scrolling text appears it jumps back to main screen
  3. boot logo not working, no matter which setting

Anything else to test? 😃

discip avatar Aug 02 '22 10:08 discip

Okay this should be fixed up a bunch I think ❤️ Thank you a bunch for this though; appreciate your effort. Would you mind giving it another poke 🤗

Ralim avatar Aug 03 '22 10:08 Ralim

Uphill battle getting TS80P to fit. Really need to sit down and cull the HAL a bit more I suspect

Ralim avatar Aug 03 '22 11:08 Ralim

@Ralim You are welcome! 😃

Really need to sit down and cull the HAL a bit more I suspect

That would be GREAT!

After the latest changes everything but the heating is back to normal!

To be more specific: It starts to heat, but behaves not as it used to with the stable release.

After A is pressed the temp reading jumps to ~140°C than to ~260°C very quickly and after that climbs digit by digit very steadily (While this ascending, the wattage reading alternates at high frequency between 12.5 W & 13.9 W. Not higher as it is supposed to do [~28 W].). Although not to the set temperature but seemingly unrestricted until I stopped it at ~390°C. But the temp reading than shows only ~290°C. 🤷‍♂️

discip avatar Aug 03 '22 14:08 discip

@Ralim Did you have time to review my observation?

discip avatar Aug 10 '22 22:08 discip

Yep I have seen the observation; but havent replicated yet (but also havent had much time to poke it) Will try and get it tested this weekend.

Ralim avatar Aug 12 '22 13:08 Ralim

@discip Okay after a bit of triage the issue with temp readings should be fixed. Had to undo one optimisation i thought I could do for space, so reclaimed some bytes in the settings drawing code instead :)

Ralim avatar Aug 14 '22 02:08 Ralim

@Ralim Sorry, but I am on vacation until Aug 20th. And unfortunately I left my device at home. 😭 Hope this can wait until then. If someone else could confirm its functionality, I would not mind either.

discip avatar Aug 14 '22 16:08 discip

No problem at all, enjoy your holiday. This is not a job, your not expected to be prepared all the time 😁

I have my unit around now and it seems to work. Will do a bit more testing with it to be sure then :) (Or I'm sure you will pull me up with issues when you are back and have time)

Ralim avatar Aug 14 '22 23:08 Ralim

Hi @Ralim, first of all thanks for your work.

I've flashed this branch on my pinecil v2 and it doesn't seem to work. I've tryed on bflb_mcu_tool on linux and the GUI on Windows. In both cases the tool return success, but the pinecil doesn't display anything on screen.

I understand I took a risk flashing it on my device. I just want to make sure it's not a problem with the branch and it's an issue on my side.

If it's working on your side, would you mind sharing the bin file?

n0cloud avatar Aug 16 '22 00:08 n0cloud

@N0Cloud Hello,

Firstly let me apologise for not having CI build the .bin file you would require. I have fixed this now.

I have compiled this locally and tested the bin file from the CI action (latest is https://github.com/Ralim/IronOS/actions/runs/2867446828 -- Download link's to file zips are at bottom of that page). These work for me here and load fine.

I'm using the command ./bflb_mcu_tool --chipname bl702 --firmware ~/Downloads/Pinecilv2/Pinecilv2_EN.bin --port /dev/ttyACM0 to load these to the device.

Have you made sure you have told it the right chip device?

Ralim avatar Aug 16 '22 11:08 Ralim

Same issue here, just attempted to flash with that build from the CI, successful flash. But a blank screen

cazagen avatar Aug 16 '22 12:08 cazagen

What did you flash with? Can you provide logs if you use the cli flasher?

Ralim avatar Aug 16 '22 12:08 Ralim

Flashing from Ubuntu 18.04 with mcu_tool from the SDK.

Logs as follows:

~/p/b/t/bflb_flash_tool ❯❯❯ ./bflb_mcu_tool --chipname bl702 --firmware ~/Downloads/pinecil/Pinecilv2_EN.bin --port /dev/ttyACM0                                                     ⏎master ✱
[13:28:09.091] - ==================================================
[13:28:09.091] - Chip name is bl702
[13:28:09.091] - Serial port is /dev/ttyACM0
[13:28:09.091] - Baudrate is 115200
[13:28:09.091] - Firmware is /home/cazagen/Downloads/pinecil/Pinecilv2_EN.bin
[13:28:09.091] - Default xtal is 32M
[13:28:09.091] - Default flash clock is XCLK
[13:28:09.091] - Default pll clock is 144M
[13:28:09.091] - ==================================================
[13:28:09.095] - EFUSE_CFG
[13:28:09.095] - BOOTHEADER_CFG
[13:28:09.107] - Create bootheader using /home/cazagen/pine/bl_mcu_sdk/tools/bflb_flash_tool/chips/bl702/img_create_mcu/efuse_bootheader_cfg.ini
[13:28:09.107] - Updating data according to </home/cazagen/pine/bl_mcu_sdk/tools/bflb_flash_tool/chips/bl702/img_create_mcu/efuse_bootheader_cfg.ini[BOOTHEADER_CFG]>
[13:28:09.109] - Created file len:176
[13:28:09.111] - Image create path: /home/cazagen/pine/bl_mcu_sdk/tools/bflb_flash_tool/chips/bl702/img_create_mcu
[13:28:09.111] - Config file: /home/cazagen/pine/bl_mcu_sdk/tools/bflb_flash_tool/chips/bl702/img_create_mcu/img_create_cfg.ini
[13:28:09.111] - Image hash is b'ca2e3931f374347ca54ba241364b6781943b5c78b17707d8ab58e49b9bfd62a0'
[13:28:09.111] - Header crc: b'1a2da1d8'
[13:28:09.111] - Write flash img
[13:28:09.112] - ========= eflash loader config =========
[13:28:09.119] - Version: eflash_loader_v2.4.0
[13:28:09.119] - Program Start
[13:28:09.119] - ========= eflash loader cmd arguments =========
[13:28:09.119] - None
[13:28:09.119] - Config file: /home/cazagen/pine/bl_mcu_sdk/tools/bflb_flash_tool/chips/bl702/eflash_loader/eflash_loader_cfg.ini
[13:28:09.120] - serial port is /dev/ttyACM0
[13:28:09.120] - cpu_reset=False
[13:28:09.120] - chiptype: bl702
[13:28:09.120] - ========= Interface is uart =========
[13:28:09.120] - com speed: 115200
[13:28:09.120] - Eflash load helper file: /home/cazagen/pine/bl_mcu_sdk/tools/bflb_flash_tool/chips/bl702/eflash_loader/eflash_loader_32m.bin
[13:28:09.120] - Eflash load helper file: /home/cazagen/pine/bl_mcu_sdk/tools/bflb_flash_tool/chips/bl702/eflash_loader/eflash_loader_32m.bin
[13:28:09.120] - ========= load eflash_loader.bin =========
[13:28:09.120] - Load eflash_loader.bin via uart
[13:28:09.120] - ========= image load =========
[13:28:09.130] - default set DTR high
[13:28:09.231] - usb serial port
[13:28:09.282] - clean buf
[13:28:09.282] - send sync
[13:28:09.386] - ack is b''
[13:28:09.386] - retry
[13:28:09.386] - default set DTR high
[13:28:09.487] - usb serial port
[13:28:09.538] - clean buf
[13:28:09.539] - send sync
[13:28:09.743] - ack is b'4f4b'
[13:28:09.773] - shake hand success
[13:28:09.784] - get_boot_info
[13:28:09.788] - data read is b'0100020700000000931d0400210004880000366dd7fdd7c4'
[13:28:09.788] - ========= ChipID: 0000366dd7fdd7c4 =========
[13:28:09.788] - last boot info: None
[13:28:09.788] - sign is 0 encrypt is 0
[13:28:09.788] - segcnt is 1
[13:28:09.795] - segdata_len is 58928
[13:28:09.810] - 4080/58928
[13:28:09.824] - 8160/58928
[13:28:09.838] - 12240/58928
[13:28:09.853] - 16320/58928
[13:28:09.868] - 20400/58928
[13:28:09.882] - 24480/58928
[13:28:09.898] - 28560/58928
[13:28:09.912] - 32640/58928
[13:28:09.926] - 36720/58928
[13:28:09.941] - 40800/58928
[13:28:09.956] - 44880/58928
[13:28:09.970] - 48960/58928
[13:28:09.985] - 53040/58928
[13:28:09.998] - 57120/58928
[13:28:10.007] - 58928/58928
[13:28:10.010] - Run img
[13:28:10.113] - Load helper bin time cost(ms): 992.509033203125
[13:28:10.213] - Flash load shake hand
[13:28:10.247] - default set DTR high
[13:28:10.347] - clean buf
[13:28:10.348] - send sync
[13:28:10.549] - ack is b'4f4b'
[13:28:10.579] - Read mac addr
[13:28:10.581] - flash set para
[13:28:10.581] - ========= flash read jedec ID =========
[13:28:10.582] - Read flash jedec ID
[13:28:10.582] - readdata:
[13:28:10.582] - b'c2201480'
[13:28:10.582] - Finished
[13:28:10.591] - Program operation
[13:28:10.591] - Dealing Index 0
[13:28:10.592] - ========= programming chips/bl702/img_create_mcu/bootinfo.bin to 0x0
[13:28:10.599] - ========= flash load =========
[13:28:10.600] - ========= flash erase =========
[13:28:10.600] - Erase flash  from 0x0 to 0xaf
[13:28:10.600] - erase pending
[13:28:10.685] - Erase time cost(ms): 85.5537109375
[13:28:10.687] - Load 176/176 {"progress":100}
[13:28:10.687] - Load 176/176 {"progress":100}
[13:28:10.687] - Write check
[13:28:10.688] - Flash load time cost(ms): 1.906005859375
[13:28:10.688] - Finished
[13:28:10.688] - Sha caled by host: de1b48b126e284ee4780dc35105d9648d5cc9f32202a16d3024d086cdd6163da
[13:28:10.688] - xip mode Verify
[13:28:10.690] - Read Sha256/176
[13:28:10.690] - Flash xip readsha time cost(ms): 1.56591796875
[13:28:10.690] - Finished
[13:28:10.690] - Sha caled by dev: de1b48b126e284ee4780dc35105d9648d5cc9f32202a16d3024d086cdd6163da
[13:28:10.691] - Verify success
[13:28:10.691] - Dealing Index 1
[13:28:10.691] - ========= programming chips/bl702/img_create_mcu/img.bin to 0x2000
[13:28:10.700] - ========= flash load =========
[13:28:10.700] - ========= flash erase =========
[13:28:10.700] - Erase flash  from 0x2000 to 0xfbdf
[13:28:10.701] - erase pending
[13:28:10.755] - erase pending
[13:28:10.813] - erase pending
[13:28:10.868] - erase pending
[13:28:10.931] - erase pending
[13:28:10.984] - erase pending
[13:28:11.037] - erase pending
[13:28:11.363] - Erase time cost(ms): 663.049072265625
[13:28:11.375] - Load 2048/56288 {"progress":3}
[13:28:11.386] - Load 4096/56288 {"progress":7}
[13:28:11.397] - Load 6144/56288 {"progress":10}
[13:28:11.409] - Load 8192/56288 {"progress":14}
[13:28:11.420] - Load 10240/56288 {"progress":18}
[13:28:11.431] - Load 12288/56288 {"progress":21}
[13:28:11.443] - Load 14336/56288 {"progress":25}
[13:28:11.454] - Load 16384/56288 {"progress":29}
[13:28:11.465] - Load 18432/56288 {"progress":32}
[13:28:11.477] - Load 20480/56288 {"progress":36}
[13:28:11.488] - Load 22528/56288 {"progress":40}
[13:28:11.499] - Load 24576/56288 {"progress":43}
[13:28:11.511] - Load 26624/56288 {"progress":47}
[13:28:11.522] - Load 28672/56288 {"progress":50}
[13:28:11.534] - Load 30720/56288 {"progress":54}
[13:28:11.545] - Load 32768/56288 {"progress":58}
[13:28:11.556] - Load 34816/56288 {"progress":61}
[13:28:11.567] - Load 36864/56288 {"progress":65}
[13:28:11.578] - Load 38912/56288 {"progress":69}
[13:28:11.590] - Load 40960/56288 {"progress":72}
[13:28:11.600] - Load 43008/56288 {"progress":76}
[13:28:11.611] - Load 45056/56288 {"progress":80}
[13:28:11.622] - Load 47104/56288 {"progress":83}
[13:28:11.634] - Load 49152/56288 {"progress":87}
[13:28:11.645] - Load 51200/56288 {"progress":90}
[13:28:11.657] - Load 53248/56288 {"progress":94}
[13:28:11.669] - Load 55296/56288 {"progress":98}
[13:28:11.674] - Load 56288/56288 {"progress":100}
[13:28:11.674] - Load 56288/56288 {"progress":100}
[13:28:11.674] - Write check
[13:28:11.674] - Flash load time cost(ms): 310.600341796875
[13:28:11.674] - Finished
[13:28:11.675] - Sha caled by host: ca2e3931f374347ca54ba241364b6781943b5c78b17707d8ab58e49b9bfd62a0
[13:28:11.675] - xip mode Verify
[13:28:11.689] - Read Sha256/56288
[13:28:11.690] - Flash xip readsha time cost(ms): 14.287841796875
[13:28:11.690] - Finished
[13:28:11.690] - Sha caled by dev: ca2e3931f374347ca54ba241364b6781943b5c78b17707d8ab58e49b9bfd62a0
[13:28:11.690] - Verify success
[13:28:11.690] - Program Finished
[13:28:11.690] - All time cost(ms): 2570.555419921875
[13:28:11.791] - close interface
[13:28:11.792] - [All Success]

cazagen avatar Aug 16 '22 12:08 cazagen

I'm using the same command line with the correct chipname. I'll try with the bin from the CI later today when I get time

n0cloud avatar Aug 16 '22 13:08 n0cloud

Still the same issue with the bin from CI. Tried with multiple bflb-mcu-tool versions

bflb-mcu-tool --chipname bl702 --port /dev/ttyACM1 --firmware $HOME/Documents/Pinecilv2_EN.bin 
[11:22:45.904] - ==================================================
[11:22:45.904] - Chip name is bl702
[11:22:45.904] - Serial port is /dev/ttyACM1
[11:22:45.904] - Baudrate is 115200
[11:22:45.904] - Firmware is /home/gabriel/Documents/Pinecilv2_EN.bin
[11:22:45.904] - Device Tree is None
[11:22:45.904] - ==================================================
[11:22:45.904] - Default xtal is 32M
[11:22:45.904] - Default flash clock is XCLK
[11:22:45.904] - Default pll clock is 144M
[11:22:45.907] - EFUSE_CFG
[11:22:45.907] - BOOTHEADER_CFG
[11:22:45.908] - Create bootheader using /home/gabriel/.local/lib/python3.10/site-packages/bflb_mcu_tool/chips/bl702/img_create_mcu/efuse_bootheader_cfg.ini
[11:22:45.908] - Updating data according to </home/gabriel/.local/lib/python3.10/site-packages/bflb_mcu_tool/chips/bl702/img_create_mcu/efuse_bootheader_cfg.ini[BOOTHEADER_CFG]>
[11:22:45.909] - Created file len:176
[11:22:45.910] - Image create path: /home/gabriel/.local/lib/python3.10/site-packages/bflb_mcu_tool/chips/bl702/img_create_mcu
[11:22:45.910] - Config file: /home/gabriel/.local/lib/python3.10/site-packages/bflb_mcu_tool/chips/bl702/img_create_mcu/img_create_cfg.ini
[11:22:45.910] - Image hash is b'ca2e3931f374347ca54ba241364b6781943b5c78b17707d8ab58e49b9bfd62a0'
[11:22:45.910] - Header crc: b'1a2da1d8'
[11:22:45.910] - Write flash img
[11:22:45.910] - ========= eflash loader config =========
[11:22:45.914] - Version: eflash_loader_v2.4.2
[11:22:45.914] - Program Start
[11:22:45.914] - ========= eflash loader cmd arguments =========
[11:22:45.914] - None
[11:22:45.914] - Config file: /home/gabriel/.local/lib/python3.10/site-packages/bflb_mcu_tool/chips/bl702/eflash_loader/eflash_loader_cfg.ini
[11:22:45.914] - serial port is /dev/ttyACM1
[11:22:45.914] - cpu_reset=False
[11:22:45.914] - chiptype: bl702
[11:22:45.914] - ========= Interface is uart =========
[11:22:45.914] - com speed: 115200
[11:22:45.914] - Eflash load helper file: /home/gabriel/.local/lib/python3.10/site-packages/bflb_mcu_tool/chips/bl702/eflash_loader/eflash_loader_32m.bin
[11:22:45.914] - ========= load eflash_loader.bin =========
[11:22:45.914] - Load eflash_loader.bin via uart
[11:22:45.914] - ========= image load =========
[11:22:45.926] - default set DTR high
[11:22:46.026] - usb serial port
[11:22:46.077] - clean buf
[11:22:46.077] - send sync
[11:22:46.180] - ack is b''
[11:22:46.180] - retry
[11:22:46.180] - default set DTR high
[11:22:46.280] - usb serial port
[11:22:46.332] - clean buf
[11:22:46.332] - send sync
[11:22:46.535] - ack is b'4f4b'
[11:22:46.565] - shake hand success
[11:22:46.575] - get_boot_info
[11:22:46.578] - data read is b'0100020700000000931d04002400048800005582d7fdd7c4'
[11:22:46.578] - ========= ChipID: 00005582d7fdd7c4 =========
[11:22:46.578] - last boot info: None
[11:22:46.578] - sign is 0 encrypt is 0
[11:22:46.578] - segcnt is 1
[11:22:46.586] - segdata_len is 59200
[11:22:46.621] - 4080/59200
[11:22:46.656] - 8160/59200
[11:22:46.690] - 12240/59200
[11:22:46.725] - 16320/59200
[11:22:46.760] - 20400/59200
[11:22:46.794] - 24480/59200
[11:22:46.829] - 28560/59200
[11:22:46.864] - 32640/59200
[11:22:46.899] - 36720/59200
[11:22:46.933] - 40800/59200
[11:22:46.968] - 44880/59200
[11:22:47.002] - 48960/59200
[11:22:47.037] - 53040/59200
[11:22:47.071] - 57120/59200
[11:22:47.090] - 59200/59200
[11:22:47.093] - Run img
[11:22:47.195] - Load helper bin time cost(ms): 1281.181884765625
[11:22:47.295] - Flash load shake hand
[11:22:47.303] - default set DTR high
[11:22:47.404] - clean buf
[11:22:47.404] - send sync
[11:22:47.604] - ack is b'4f4b'
[11:22:47.634] - Read mac addr
[11:22:47.635] - flash set para
[11:22:47.635] - set flash cfg: 102FF
[11:22:47.635] - Set flash config
[11:22:47.636] - Set para time cost(ms): 0.6201171875
[11:22:47.636] - ========= flash read jedec ID =========
[11:22:47.636] - Read flash jedec ID
[11:22:47.636] - readdata:
[11:22:47.636] - b'c2201480'
[11:22:47.636] - Finished
[11:22:47.638] - Program operation
[11:22:47.638] - Dealing Index 0
[11:22:47.638] - ========= programming chips/bl702/img_create_mcu/bootinfo.bin to 0x00000000
[11:22:47.639] - ========= flash load =========
[11:22:47.639] - ========= flash erase =========
[11:22:47.639] - Erase flash  from 0x0 to 0xaf
[11:22:47.639] - erase pending
[11:22:47.716] - Erase time cost(ms): 77.271728515625
[11:22:47.718] - Load 176/176 {"progress":100}
[11:22:47.718] - Load 176/176 {"progress":100}
[11:22:47.718] - Write check
[11:22:47.718] - Flash load time cost(ms): 1.7001953125
[11:22:47.718] - Finished
[11:22:47.718] - Sha caled by host: de1b48b126e284ee4780dc35105d9648d5cc9f32202a16d3024d086cdd6163da
[11:22:47.718] - xip mode Verify
[11:22:47.720] - Read Sha256/176
[11:22:47.720] - Flash xip readsha time cost(ms): 1.472412109375
[11:22:47.720] - Finished
[11:22:47.720] - Sha caled by dev: de1b48b126e284ee4780dc35105d9648d5cc9f32202a16d3024d086cdd6163da
[11:22:47.720] - Verify success
[11:22:47.720] - Dealing Index 1
[11:22:47.720] - ========= programming chips/bl702/img_create_mcu/img.bin to 0x00002000
[11:22:47.721] - ========= flash load =========
[11:22:47.722] - ========= flash erase =========
[11:22:47.722] - Erase flash  from 0x2000 to 0xfbdf
[11:22:47.722] - erase pending
[11:22:47.776] - erase pending
[11:22:47.831] - erase pending
[11:22:47.896] - erase pending
[11:22:47.951] - erase pending
[11:22:48.006] - erase pending
[11:22:48.061] - erase pending
[11:22:48.385] - Erase time cost(ms): 663.30224609375
[11:22:48.397] - Load 2048/56288 {"progress":3}
[11:22:48.410] - Load 4096/56288 {"progress":7}
[11:22:48.422] - Load 6144/56288 {"progress":10}
[11:22:48.435] - Load 8192/56288 {"progress":14}
[11:22:48.448] - Load 10240/56288 {"progress":18}
[11:22:48.460] - Load 12288/56288 {"progress":21}
[11:22:48.473] - Load 14336/56288 {"progress":25}
[11:22:48.485] - Load 16384/56288 {"progress":29}
[11:22:48.498] - Load 18432/56288 {"progress":32}
[11:22:48.510] - Load 20480/56288 {"progress":36}
[11:22:48.523] - Load 22528/56288 {"progress":40}
[11:22:48.535] - Load 24576/56288 {"progress":43}
[11:22:48.548] - Load 26624/56288 {"progress":47}
[11:22:48.561] - Load 28672/56288 {"progress":50}
[11:22:48.573] - Load 30720/56288 {"progress":54}
[11:22:48.586] - Load 32768/56288 {"progress":58}
[11:22:48.598] - Load 34816/56288 {"progress":61}
[11:22:48.611] - Load 36864/56288 {"progress":65}
[11:22:48.623] - Load 38912/56288 {"progress":69}
[11:22:48.636] - Load 40960/56288 {"progress":72}
[11:22:48.648] - Load 43008/56288 {"progress":76}
[11:22:48.661] - Load 45056/56288 {"progress":80}
[11:22:48.673] - Load 47104/56288 {"progress":83}
[11:22:48.686] - Load 49152/56288 {"progress":87}
[11:22:48.698] - Load 51200/56288 {"progress":90}
[11:22:48.711] - Load 53248/56288 {"progress":94}
[11:22:48.724] - Load 55296/56288 {"progress":98}
[11:22:48.730] - Load 56288/56288 {"progress":100}
[11:22:48.730] - Load 56288/56288 {"progress":100}
[11:22:48.730] - Write check
[11:22:48.731] - Flash load time cost(ms): 345.751220703125
[11:22:48.731] - Finished
[11:22:48.731] - Sha caled by host: ca2e3931f374347ca54ba241364b6781943b5c78b17707d8ab58e49b9bfd62a0
[11:22:48.731] - xip mode Verify
[11:22:48.759] - Read Sha256/56288
[11:22:48.759] - Flash xip readsha time cost(ms): 27.4306640625
[11:22:48.759] - Finished
[11:22:48.759] - Sha caled by dev: ca2e3931f374347ca54ba241364b6781943b5c78b17707d8ab58e49b9bfd62a0
[11:22:48.759] - Verify success
[11:22:48.759] - Program Finished
[11:22:48.759] - All time cost(ms): 2845.287353515625
[11:22:48.866] - close interface
[11:22:48.866] - [All Success]

n0cloud avatar Aug 16 '22 15:08 n0cloud

Okay so for me this is the logs (at the end). Noting that none of the hashes line up, so possible default configuration has moved away from the one I am using. As such, have attached all the files mentioned in the logs to this message. BLFiles.tar.gz

./bflb_mcu_tool --chipname bl702  --firmware ~/Downloads/Pinecilv2/Pinecilv2_EN.bin --port /dev/ttyACM0
[20:35:16.404] - ==================================================
[20:35:16.404] - Chip name is bl702
[20:35:16.404] - Serial port is /dev/ttyACM0
[20:35:16.404] - Baudrate is 115200
[20:35:16.404] - Firmware is /home/ralim/Downloads/Pinecilv2/Pinecilv2_EN.bin
[20:35:16.404] - Default xtal is 32M
[20:35:16.404] - Default flash clock is 72M
[20:35:16.404] - Default pll clock is 144M
[20:35:16.404] - ==================================================
[20:35:16.410] - Update flash cfg finished
[20:35:16.411] - EFUSE_CFG
[20:35:16.411] - BOOTHEADER_CFG
[20:35:16.413] - Create bootheader using /home/ralim/Downloads/bl_mcu_sdk/tools/bflb_flash_tool/chips/bl702/img_create_mcu/bootheader_cfg.ini
[20:35:16.413] - Updating data according to </home/ralim/Downloads/bl_mcu_sdk/tools/bflb_flash_tool/chips/bl702/img_create_mcu/bootheader_cfg.ini[BOOTHEADER_CFG]>
[20:35:16.415] - Created file len:176
[20:35:16.416] - Image create path: /home/ralim/Downloads/bl_mcu_sdk/tools/bflb_flash_tool/chips/bl702/img_create_mcu
[20:35:16.417] - Config file: /home/ralim/Downloads/bl_mcu_sdk/tools/bflb_flash_tool/chips/bl702/img_create_mcu/img_create_cfg.ini
[20:35:16.417] - Image hash is b'af0c7b10ba32a44c6a0b0e3708afc5ecd91c0ec625617034cdba85ca4e54d1d2'
[20:35:16.417] - Header crc: b'e99b5c62'
[20:35:16.417] - Write flash img
[20:35:16.418] - ========= eflash loader config =========
[20:35:16.425] - Version: bflb_eflash_loader_v2.1.2
[20:35:16.425] - Program Start
[20:35:16.425] - ========= eflash loader cmd arguments =========
[20:35:16.425] - Config file: /home/ralim/Downloads/bl_mcu_sdk/tools/bflb_flash_tool/chips/bl702/eflash_loader/eflash_loader_cfg.ini
[20:35:16.425] - serial port is /dev/ttyACM0
[20:35:16.425] - chiptype: bl702
[20:35:16.425] - ========= Interface is uart =========
[20:35:16.425] - com speed: 115200
[20:35:16.425] - Eflash load helper file: /home/ralim/Downloads/bl_mcu_sdk/tools/bflb_flash_tool/chips/bl702/eflash_loader/eflash_loader_32m.bin
[20:35:16.425] - Eflash load helper file: /home/ralim/Downloads/bl_mcu_sdk/tools/bflb_flash_tool/chips/bl702/eflash_loader/eflash_loader_32m.bin
[20:35:16.426] - ========= load eflash_loader.bin =========
[20:35:16.426] - Load eflash_loader.bin via uart
[20:35:16.426] - ========= image load =========
[20:35:16.435] - usb serial port
[20:35:16.487] - clean buf
[20:35:16.487] - send sync
[20:35:16.589] - ack is b''
[20:35:16.589] - retry
[20:35:16.589] - usb serial port
[20:35:16.639] - clean buf
[20:35:16.640] - send sync
[20:35:16.843] - ack is b'4f4b'
[20:35:16.873] - shake hand success
[20:35:16.883] - get_boot_info
[20:35:16.899] - data read is b'0100020700000000931d0400230004880000886dd7fdd7c4'
[20:35:16.899] - ========= ChipID: 0000886dd7fdd7c4 =========
[20:35:16.899] - sign is 0 encrypt is 0
[20:35:16.900] - segcnt is 1
[20:35:16.930] - segdata_len is 64784
[20:35:16.959] - 4080/64784
[20:35:16.990] - 8160/64784
[20:35:17.020] - 12240/64784
[20:35:17.050] - 16320/64784
[20:35:17.079] - 20400/64784
[20:35:17.110] - 24480/64784
[20:35:17.140] - 28560/64784
[20:35:17.169] - 32640/64784
[20:35:17.200] - 36720/64784
[20:35:17.230] - 40800/64784
[20:35:17.260] - 44880/64784
[20:35:17.290] - 48960/64784
[20:35:17.320] - 53040/64784
[20:35:17.350] - 57120/64784
[20:35:17.380] - 61200/64784
[20:35:17.408] - 64784/64784
[20:35:17.422] - Run img
[20:35:17.538] - Load helper bin time cost(ms): 1112.07421875
[20:35:17.638] - ========= flash read jedec ID =========
[20:35:17.638] - Flash load shake hand
/dev/ttyACM0 115200 bl702
[20:35:17.654] - clean buf
[20:35:17.654] - send sync
[20:35:17.855] - ack is b'4f4b'
[20:35:17.885] - Read flash jedec ID
[20:35:17.886] - readdata:
[20:35:17.886] - b'c2201480'
[20:35:17.886] - Finished
[20:35:17.886] - Program operation
[20:35:17.886] - Dealing Index 0
[20:35:17.886] - ========= programming chips/bl702/img_create_mcu/bootinfo.bin to 0x0
[20:35:17.889] - ========= flash load =========
[20:35:17.890] - ========= flash erase =========
[20:35:17.890] - Erase flash  from 0x0 to 0xaf
[20:35:17.951] - Erase time cost(ms): 61.86181640625
[20:35:17.953] - Load 176/176 {"progress":100}
[20:35:17.953] - Load 176/176 {"progress":100}
[20:35:17.953] - Write check
[20:35:17.953] - Flash load time cost(ms): 1.285888671875
[20:35:17.953] - Finished
[20:35:17.953] - Sha caled by host: 43978bb325bb802251ed340e88c6ce784c39c4193ea86c46dd30e6fc172067ab
[20:35:17.953] - xip mode Verify
[20:35:17.955] - Read Sha256/176
[20:35:17.955] - Flash xip readsha time cost(ms): 1.35107421875
[20:35:17.955] - Finished
[20:35:17.955] - Sha caled by dev: 43978bb325bb802251ed340e88c6ce784c39c4193ea86c46dd30e6fc172067ab
[20:35:17.955] - Verify success
[20:35:17.955] - Dealing Index 1
[20:35:17.955] - ========= programming chips/bl702/img_create_mcu/img.bin to 0x2000
[20:35:17.958] - ========= flash load =========
[20:35:17.958] - ========= flash erase =========
[20:35:17.959] - Erase flash  from 0x2000 to 0xfbdf
[20:35:18.567] - Erase time cost(ms): 608.720458984375
[20:35:18.577] - Load 2048/56288 {"progress":3}
[20:35:18.587] - Load 4096/56288 {"progress":7}
[20:35:18.597] - Load 6144/56288 {"progress":10}
[20:35:18.607] - Load 8192/56288 {"progress":14}
[20:35:18.617] - Load 10240/56288 {"progress":18}
[20:35:18.626] - Load 12288/56288 {"progress":21}
[20:35:18.636] - Load 14336/56288 {"progress":25}
[20:35:18.646] - Load 16384/56288 {"progress":29}
[20:35:18.655] - Load 18432/56288 {"progress":32}
[20:35:18.665] - Load 20480/56288 {"progress":36}
[20:35:18.675] - Load 22528/56288 {"progress":40}
[20:35:18.685] - Load 24576/56288 {"progress":43}
[20:35:18.695] - Load 26624/56288 {"progress":47}
[20:35:18.705] - Load 28672/56288 {"progress":50}
[20:35:18.714] - Load 30720/56288 {"progress":54}
[20:35:18.724] - Load 32768/56288 {"progress":58}
[20:35:18.734] - Load 34816/56288 {"progress":61}
[20:35:18.743] - Load 36864/56288 {"progress":65}
[20:35:18.753] - Load 38912/56288 {"progress":69}
[20:35:18.763] - Load 40960/56288 {"progress":72}
[20:35:18.772] - Load 43008/56288 {"progress":76}
[20:35:18.781] - Load 45056/56288 {"progress":80}
[20:35:18.791] - Load 47104/56288 {"progress":83}
[20:35:18.800] - Load 49152/56288 {"progress":87}
[20:35:18.810] - Load 51200/56288 {"progress":90}
[20:35:18.820] - Load 53248/56288 {"progress":94}
[20:35:18.830] - Load 55296/56288 {"progress":98}
[20:35:18.835] - Load 56288/56288 {"progress":100}
[20:35:18.835] - Load 56288/56288 {"progress":100}
[20:35:18.835] - Write check
[20:35:18.835] - Flash load time cost(ms): 267.43603515625
[20:35:18.835] - Finished
[20:35:18.835] - Sha caled by host: af0c7b10ba32a44c6a0b0e3708afc5ecd91c0ec625617034cdba85ca4e54d1d2
[20:35:18.835] - xip mode Verify
[20:35:18.850] - Read Sha256/56288
[20:35:18.850] - Flash xip readsha time cost(ms): 14.94287109375
[20:35:18.850] - Finished
[20:35:18.851] - Sha caled by dev: af0c7b10ba32a44c6a0b0e3708afc5ecd91c0ec625617034cdba85ca4e54d1d2
[20:35:18.851] - Verify success
[20:35:18.851] - Program Finished
[20:35:18.851] - All time cost(ms): 2425.687255859375
[20:35:18.952] - [All Success]

Ralim avatar Aug 17 '22 10:08 Ralim

That did it! Working now after replacing those files. Thanks for the help!

cazagen avatar Aug 17 '22 10:08 cazagen

Glorious, Thank you for raising awareness / letting me know about this issue❤️

Ralim avatar Aug 17 '22 11:08 Ralim

It's working, thank you

I had to use branch V1.2.6 of bl_mcu_sdk and replace the files with yours to make it work. (Using branch V1.2.6 since bflb_eflash_loader version is the same as showed in your logs) Maybe it's not needed and I had some cached files.

Feel free to ask if you need someone to test things

n0cloud avatar Aug 17 '22 15:08 n0cloud

What about removing "[WiP]" on title for ease of later search?

OctopusET avatar Aug 19 '22 07:08 OctopusET