|
From: Lucas V. H. <luc...@gm...> - 2017-01-11 16:01:35
|
Hello, this is my first post here, so please forgive me if I miss something. I was writing a remote-bitbang-like implementation using an ESP8266 as a JTAG-TCP or SWD-TCP bridge. I got it to work with a STM32F030F4P6 as target and SWD as transport. Using pure bitbang made it awfully slow, disabling naggle madi it better but not enough. I then had the idea to move the code for bitbang_exchange to the ESP, and it got a lot better (under 15s program and boot, about 3s step over or run to breakpoint). For that I added a bitbang_interface.exchange function pointer, checked for null pointer in bitbang_exchange, and redirected the call if the pointer was not-null. This makes me concerned about other bitbang drivers drivers, though... Questions: - Is this redirection desired at all for the OpenOCD project? - Is it safe to presume uninitialized structure fields (i.e. the exchange function pointer) are implicitly zero? If it is not safe then I'll need to fix all other bitbang-based drivers (initialize exchange to null) before I submit a patch to gerrit. Regards. -- Lucas Vinicius Hartmann Dizem que se você rodar o CD do Windows ao contrário ele mostra uma mensagem demoníaca... Mas isso nem é o pior, se você rodar ele normal ele instala o Windows! |