Commit Graph

1051 Commits

Author SHA1 Message Date
UweBonnes a3bbdc26c0
Merge pull request #445 from UweBonnes/#432
Fixing stm32l4 target to allow probing w/o halting. Cleaned up from #432 from anyn99.
2019-02-21 19:17:00 +01:00
anyn99 3f8c40d3f5 Fixing stm32l4 target to allow probing w/o halting 2019-02-21 18:06:38 +01:00
UweBonnes 22265243ab
Merge pull request #360 from newbrain/ke04support
Kinetis KE04: Flash and debug support
2019-02-18 13:07:32 +01:00
newbrain 8de1b45c85 Kinetis KE04: Flash and debug support
Support for Kinetis KE04 8KiB, 64KiB and 128KiB variants in nxpke04.c
Target monitor commands for sector and mass erase.
Changes to kinetis.c MDM-AP target to support KE04.
Only KE04Z8 tested in HW.
2019-02-17 22:48:23 +01:00
UweBonnes cdb04a4214
Merge pull request #442 from r0ck3tAKATrashPanda/master
Added ability to lock and unlock boot rom for samd controllers
2019-02-14 16:15:09 +01:00
Carl 02c1934c03 Added ability to lock and unlock boot rom for samd controllers 2019-02-13 16:33:07 -08:00
UweBonnes 7032abd2b0
Merge pull request #433 from UweBonnes/gcc8
Makefile: Add -Wnocast-function-type for compilation on gcc8.
2019-01-28 21:25:33 +01:00
Uwe Bonnes a6b75bb4ef Makefile: Add -Wnocast-function-type for compilation on gcc8.
Older GCC versions do not warn for disabled warnings they do not know yet.
This is needed to compile with gcc8.
2019-01-16 23:17:17 +01:00
Richard Meadows 0b28232f72 [efm32] Assume Device Identification (DI) version 1 if we don't know the OUI (#402)
* [efm32] Assume Device Identification (DI) version 1 if we don't know the OUI

Silabs are using some additional OUIs we don't know about. Reported in issue #389
These should use a DI version 1 layout, so assume version 1 layout for OUIs we don't
know. However do print a notice about this on DEBUG() as suggested by @UweBonnes

The IDCODE value is sufficient to make a positive identification of an EFM32 device.
See AN0062 Section 2.2. Therefore accepting any OUI is reasonable behaviour.
Additionally the part familiy is checked, and the target rejected if not in the
`efm32_devices` table. This commit makes that rejection explicit, although it does
not change the logical behaviour here.

Note that the important registers (part number, part family, flash size) are at the
same addresses in both layouts anyhow. Currently only `efm32_cmd_serial` and
`efm32_cmd_efm_info` functions use registers that differ between DI versions.

* [efm32] tidy format warning about portability UB

* [efm32] Simplify OUI checking

* Only read the OUI once
* Accept the device even if the OU is unknown, as silabs have been using
  a variety of OUIs
* Perform fewer register reads before checking the device family is valid
2019-01-16 09:58:59 +13:00
UweBonnes 488436c46a
Merge pull request #428 from UweBonnes/stm32g0
Stm32 functional additions and fix
2019-01-09 17:17:56 +01:00
Uwe Bonnes 7cc02867ae stm32f4: Fix problems with small flash sizes creating overflow or empty regions.
Thanks to "DerMeisteRR" for pointing out.
2019-01-09 12:23:49 +01:00
Uwe Bonnes 47fad2bf7f Add Stm32L41x. 2019-01-09 12:23:49 +01:00
Uwe Bonnes f0c6e2bbd2 Add STM32G07x. 2019-01-09 12:23:49 +01:00
UweBonnes a65ce77466
Merge pull request #427 from UweBonnes/mingw_ftdi
libftdi: Allow to compile with mingw and cygwin and use recent libftdi1.
2019-01-08 22:29:36 +01:00
Uwe Bonnes 0793dac2cf libftdi: Allow to compile with mingw and cygwin and use recent libftdi1.
Tested with x86_64-w64-mingw32-gcc-8.2.0 and cygwin gcc (GCC) 7.3.0.
Use libftdi1 unconditionally.
Try to convice github travis to use libftdi1.
Remove unportable "uint ". Thanks to jacereda for pointing out in #400.
2019-01-07 15:31:57 +01:00
Ingmar Jager 3f0c9ccee1 Fix support for LPC1115 and LPC1115XL devices (#415)
* Add support for LPC11U3X devices.

The DeviceID register has a different address from the LPC11XX devices.
But it is shared with the LPC8XX family.

* Fix support for LPC1115 and LPC1115XL devices

* Fix whitespace
2019-01-07 13:34:00 +13:00
Manoel Brunnen 7cfeb61399 Add udev rules 2019-01-07 13:32:58 +13:00
Josh Robson Chase 02b9d5f1ac Add delay to cortexm_reset 2019-01-07 13:32:17 +13:00
Josh Robson Chase d7e2923990 Debug on stm32f1_flash_erase errors 2019-01-07 13:32:17 +13:00
Uwe Bonnes 6df793dbf0 Revert "Allow to specificy if SRST is asserted and when it is released."
This reverts commit 44fc24e0e7.
2019-01-07 13:22:01 +13:00
Uwe Bonnes 9ce05ae67b stm32h7/f7: Store DBGMCU_CR on attach() and restore on detach().
On STM32[FH]7, DBG_SLEEP must be set for debugging.
2019-01-07 13:22:01 +13:00
Uwe Bonnes 8d6092b73f cortexm_forced_halt: Only release SRST after "Halt on reset" command.
This should make life easier if program remaps JTAG/SWD pins so that
with program running, JTAG/SWD access is impossible.
2019-01-07 13:22:01 +13:00
Uwe Bonnes 3ebf049424 cortexm: Only force halt before probe if idcode is unknown and ROM TABLE unreadable. 2019-01-07 13:22:01 +13:00
Uwe Bonnes 6633f74d95 stm32h7/f7: Write DBGMCU_CR only on attach.
Split probe/attach for STM32H7.
2019-01-07 13:22:01 +13:00
Uwe Bonnes 8575d3e7a6 stm32f7/h7: Use the DPv2 provided idcode for MCU identification. 2019-01-07 13:22:01 +13:00
Uwe Bonnes 525b90d4e5 cortexm: Only force halt before probe() if probe was forced. 2019-01-07 13:22:01 +13:00
Uwe Bonnes da75acf015 adiv5: Only force cortexm_probe() once. 2019-01-07 13:22:01 +13:00
Uwe Bonnes 489f24584b adiv5: Read TARGETID on DPv2 devices. 2019-01-07 13:22:01 +13:00
Uwe Bonnes cde7726b87 cortexm: detach still needs extra cycles. 2019-01-07 13:22:01 +13:00
Ingmar Jager 14bedcc441 Add support for LPC11U3X devices.
The DeviceID register has a different address from the LPC11XX devices.
But it is shared with the LPC8XX family.
2018-10-04 08:53:05 -07:00
Benjamin Vernoux 771d81a5f0 Fix link for windows_dfu_util 2018-10-03 15:20:09 -07:00
Uwe Bonnes d8b01ff61f swlink: Enable UART2 for SWO.
Stlink on STM8S-Disco needs additional wiring for SWO.
2018-10-03 15:19:33 -07:00
Uwe Bonnes 7cafc44bd9 swlink: Allow to enable debug on second VCOM. 2018-10-03 15:19:33 -07:00
Uwe Bonnes 0d246fb31a swlink: Measure voltage on VDD pin of Stlink/Stm8s. 2018-10-03 15:19:33 -07:00
Uwe Bonnes 184ef991bf swlink: Handle LED. 2018-10-03 15:19:33 -07:00
Uwe Bonnes 06272e0a59 swlink: Implement dfu_upgrade. 2018-10-03 15:19:33 -07:00
Uwe Bonnes 530d1e5c28 swlink: Handle force boot on bluepill. 2018-10-03 15:19:33 -07:00
Uwe Bonnes b744d8b0c9 swlink: Implement NRST. 2018-10-03 15:19:33 -07:00
Uwe Bonnes 1263d185a6 swlink: Distinguish between Stlink on STM8-Disco and "blue pill". 2018-10-03 15:19:33 -07:00
Nikolay Dimitrov 29386aee14 scripts/stm32_mem: Fix issue with scanning USB DFU devices
While scanning the USB bus for devices, stm32_scan() can find a device that it
doesn't have permissions to access it, dfu/usb class raises an exception and
stm32_scan() stops the scan completely.

This fix resolves the scan issue, by allowing the scan loop to continue.
While at it, there are cosmetic fixes related with tabs/spaces and readability.

Signed-off-by: Nikolay Dimitrov <nikolay.dimitrov@retrohub.org>
2018-09-17 14:36:28 +12:00
Gareth McMullin 7f947d724c
Merge pull request #393 from markrages/add_id_2
Another nRF52 ID.
2018-09-14 11:21:04 +12:00
Mark Rages 91dd879dac Another nRF52 ID. 2018-09-13 16:18:29 -06:00
Gareth McMullin 3a598a0cf3
Merge pull request #384 from rikvdh/feature/readable-reset-stlink
Change the ST-Link SRST reset function
2018-09-07 08:13:48 +12:00
Gareth McMullin f328ca5181
Merge pull request #391 from UweBonnes/swd_cycles
adiv5_swdp: Add extra idle cycles with write transactions.
2018-09-07 07:58:41 +12:00
Uwe Bonnes f5cf6d4497 adiv5_swdp: Add extra idle cycles with write transactions.
These extra cycles are needed by some CPU, e.g. STM32L0x1 to cross the SWCLK
/HCLK domains. Revert insufficient #373 also tackling that problem.

Thanks to Thorsten von Eicken for pointing out.
2018-09-06 17:29:20 +02:00
Gareth McMullin db544e9b67
Merge pull request #390 from rikvdh/feature/lpc_with_iap_down
Move the LPC17xx probe function down
2018-09-06 08:15:54 +12:00
Rik van der Heijden 95053b3b4e Change the ST-Link SRST function to use libopencm3 helper functions and fix waiting for the pin-state, change init to use the SRST function for reset de-assertion 2018-09-05 20:28:02 +02:00
Rik van der Heijden f39701c4c8 Move the LPC17xx probe function down since it performs an IAP call which can hang when performed on other devices than a LPC17xx 2018-09-05 17:40:02 +02:00
Gareth McMullin c5c0783337
Merge pull request #378 from markrages/nordic_unlock
Add extra port for mass erasing / unprotecting nRF52 with APPROTECT set.
2018-07-28 14:56:03 +12:00
Mark Rages d0a8ce0819 Add extra port for mass erasing / unprotecting nRF52 with APPROTECT set.
Mostly copied from the equivalent in kinetis.c and
https://devzone.nordicsemi.com/f/nordic-q-a/12484/approtect-and-dap/47301
2018-07-27 16:07:19 -06:00