Conversation
This commit modifies lpc_iap_call() to work with IAP commands that return additional data. If the "result" argument is non-null, 16 bytes of data (the maximum returned by any IAP command) are copied to the specified address.
Restore the RAM and registers which are clobbered by an LPC IAP call. This does not restore any additional RAM which might be clobbered by a *particular* IAP call. (For example, flash programming always clobbers the last page of RAM.)
some STM ST-LINK/V2 also provide SWIM functionality to flash STM8. the SWIM pins are connected to UART (USART1 REMAP): - SWIM_RST is connected to PB6/USART1_TX - SWIM is connected to PB7/USART1_RX (pulled up by 680R) cheap ST-LINK/V2 clones in form of USB dongle with aluminium case provide SWD and SWIM signals. since blackmagic does not support SWIM functionality, the pins can be re-used as UART port for the USB to UART bridge. STM ST-LINK/V2 can also offer UART, using USART2, but then the SWIM signals are not present. this changes verifies if the SWIM signals are present and remaps them to USART1 if this is the case.
This prepares to allow other architectures than pc that don't use libopencm3. Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
This allows the platform to specify another optimization level than the default (like -Os if space is limited) Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
It's a global symbol and LTO will complain if the one in this file and the one in EFM32 target are inconsistent. Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
snprintf is needed anyway, that's one less function to have :p And it's bad practice anyway. Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
|
Did you check that your patches do not collide with the SWO functionality? |
Minor enhancements
Target latest libopencm3 version
|
I did not test it. For the stlink platform SWO is defined on UART1_RX/PA10 The ST-Link/V2-1 supports SWO on UART1_RX/PA10, but since it is not detected as clone with SWIM support, the UART1 is not re-used on the SWIM pin. Ideally for the clones with SWIM, PLATFORM_HAS_TRACESWO should be set to 0. |
FIXME: Writing CPU registers on M4 of STM32H745 seems not to work.
Fix as seen in openocd. SYSROM_PIDR2 has only 3 bits for the JEP106 identity code field, bits [6:4].
After update of GNU make the tests for Windows OS are no longer needed. Note that GNU make 4.2.1 is used to build BMP under Windows OS. Make native working Again, the newer version of GCC make does not need the OS tests.
swlink: Remove redundant conditional usbart_init().
Added braces for compatibility with python3, should still be valid python2 which interpretes these braces as a tuple with a single element and simplifies it to that element. Replaced whitespaces with tabs as required by python3, since indentation must be uniform (either whitespaces or tabs). Removed trailing whitespaces. Tested by flashing various STM32 boards with blackmagic firmware using python3.7.
Add LPC11xx command to read out unique ID from target. Restore Ram and registers after call.
Rework MSC layout check
This is a bit in the Lock Bit (LB) flash page, so it can only be cleared by this routine
Supported functionality through this AP: * Issuing a DEVICEERASE command
Rebase EFM patch blackmagic-debug#438, compiling fine in all intermediate steps
Needed when reading some memory region of unknown size.
- Program, read and verify flash - Test mode: Probe and attach to device and exit
Command line interaction for pc-hosted platforms.
Issue reset only when flashing or when reset was requested.
… flash. Allow to erase from command line.
Both V2 and V21 switch to (ST) bootloader with powered reset.
some STM ST-LINK/V2 also provide SWIM functionality to flash STM8. the SWIM pins are connected to UART (USART1 REMAP): - SWIM_RST is connected to PB6/USART1_TX - SWIM is connected to PB7/USART1_RX (pulled up by 680R) cheap ST-LINK/V2 clones in form of USB dongle with aluminium case provide SWD and SWIM signals. since blackmagic does not support SWIM functionality, the pins can be re-used as UART port for the USB to UART bridge. STM ST-LINK/V2 can also offer UART, using USART2, but then the SWIM signals are not present. this changes verifies if the SWIM signals are present and remaps them to USART1 if this is the case.
some STM ST-LINK/V2 also provide SWIM functionality to flash STM8.
the SWIM pins are connected to UART (USART1 REMAP):
cheap ST-LINK/V2 clones in form of USB dongle with aluminium case
provide SWD and SWIM signals.
since blackmagic does not support SWIM functionality, the pins can
be re-used as UART port for the USB to UART bridge.
STM ST-LINK/V2 can also offer UART, using USART2, but then the
SWIM signals are not present.
this changes verifies if the SWIM signals are present and remaps
them to USART1 if this is the case.