remotemcu / remcu_examples

The examples of the REMCU lib (https://remotemcu.github.io/)
https://interrupt.memfault.com/blog/mcu-peripheral-forwarding
484 stars 17 forks source link

Why is 6 bytes a minimum read and write, use remcu_loadFrMem/remcu_store2mem. instead of 4 bytes or other? #17

Closed hongshui3000 closed 11 months ago

hongshui3000 commented 11 months ago

Why is 6 bytes a minimum read and write, use remcu_loadFrMem/remcu_store2mem. instead of 4 bytes or other

define MIN_MEM_OPERATION_SIZE 6

ser-mk commented 11 months ago

If I recall correctly, the requirement for 6 bytes as a minimum read and write is related to a bug in the 10.12 version of OpenOCD. I'll look into the details of the bug and check if there are any updates in the newer versions.

ser-mk commented 11 months ago

I checked the OpenOCD version for the mentioned bug, but couldn't confirm it for both old and new versions. The 6-byte limit in the code, written four years ago, might have been influenced by an encounter with an odd debugger. I can't recall the exact reason. I have changed the limit and I will rebuild the library soon.

hongshui3000 commented 11 months ago

Got it, thanks for the reply

ser-mk commented 11 months ago

I've updated the prebuilt library https://github.com/remotemcu/prebuilt_libraries Please check the latest version