fw/stlink
12 years agoRemove an outdated FIXME
Uwe Bonnes [Tue, 7 Feb 2012 20:20:54 +0000 (21:20 +0100)]
Remove an outdated FIXME

12 years agoMerge pull request #59 from UweBonnes/master
texane [Sat, 4 Feb 2012 15:17:34 +0000 (07:17 -0800)]
Merge pull request #59 from UweBonnes/master

Distinguish L1/F2/F4 and let F2 program

12 years agoReport about more Chips tested
Uwe Bonnes [Sat, 4 Feb 2012 14:49:11 +0000 (15:49 +0100)]
Report about more Chips tested

12 years agoMerge branch 'master' of git://github.com/texane/stlink
Uwe Bonnes [Sat, 4 Feb 2012 14:44:40 +0000 (15:44 +0100)]
Merge branch 'master' of git://github.com/texane/stlink

Conflicts:
src/stlink-common.c
Solved by propagating Karl's name change

12 years agoMerge branch 'master' of github.com:UweBonnes/stlink
Uwe Bonnes [Thu, 2 Feb 2012 21:53:20 +0000 (22:53 +0100)]
Merge branch 'master' of github.com:UweBonnes/stlink

12 years agoFix the progress indicator for F2/F4 flash writing
Uwe Bonnes [Thu, 2 Feb 2012 21:49:33 +0000 (22:49 +0100)]
Fix the progress indicator for F2/F4 flash writing

12 years agoAssume maximum FLASH size for F2 as for F4 (broken Flash size register)
Uwe Bonnes [Thu, 2 Feb 2012 21:36:13 +0000 (22:36 +0100)]
Assume maximum FLASH size for F2 as for F4 (broken Flash size register)
Verify F2 and F4 by using a decent block size

12 years agoFor now, we can treat F2 as F4 for flashing
Uwe Bonnes [Thu, 2 Feb 2012 21:20:44 +0000 (22:20 +0100)]
For now, we can treat F2 as F4 for flashing

12 years agoFor L1/F2/F4 we need the chip-id to distinguish, F1 needs core_id as common deniminator
Uwe Bonnes [Thu, 2 Feb 2012 21:10:13 +0000 (22:10 +0100)]
For L1/F2/F4 we need the chip-id to distinguish, F1 needs core_id as common deniminator

12 years agoGive a different error when writing to flash or ram
Uwe Bonnes [Sun, 29 Jan 2012 13:21:26 +0000 (14:21 +0100)]
Give a different error when writing to flash or ram

12 years agoMerge pull request #57 from karlp/th-pull-projfiles
texane [Thu, 2 Feb 2012 05:58:38 +0000 (21:58 -0800)]
Merge pull request #57 from karlp/th-pull-projfiles

Remove all project files from stlink.

12 years agoRemove all project files from stlink.
Karl Palsson [Wed, 1 Feb 2012 23:54:02 +0000 (23:54 +0000)]
Remove all project files from stlink.

The project is made with Makefiles, so while the project files provided some convenience to some people, they were not in any
way portable or maintained.  Removing them also allows other people to keep their own versions without having to deal with
shared conflicts.

Updated gitignore to reflec this.

12 years ago Get st-util ack'ing the monitor request. Responds to
Fabien Le Mentec [Wed, 1 Feb 2012 22:05:46 +0000 (16:05 -0600)]
Get st-util ack'ing the monitor request.  Responds to
    monitor reset     -- reset the core
    monitor resume    -- get the core running but don't stop gdb executing commands
    monitor halt      -- halt the core

12 years agoMerge pull request #56 from karlp/th-pull-documentation
texane [Wed, 1 Feb 2012 21:42:54 +0000 (13:42 -0800)]
Merge pull request #56 from karlp/th-pull-documentation

Update documentation

12 years agoMerge pull request #54 from karlp/th-pull-chipids
texane [Wed, 1 Feb 2012 21:41:57 +0000 (13:41 -0800)]
Merge pull request #54 from karlp/th-pull-chipids

Unify chip id names, fix warnings

12 years agoAdd pkg-config to the list of requirements.
Karl Palsson [Wed, 1 Feb 2012 21:27:20 +0000 (21:27 +0000)]
Add pkg-config to the list of requirements.

12 years agoUpdate list of known working targets
Karl Palsson [Wed, 16 Nov 2011 02:44:01 +0000 (02:44 +0000)]
Update list of known working targets

12 years agoRemove the "merge in progress" notice
Karl Palsson [Tue, 15 Nov 2011 01:42:47 +0000 (01:42 +0000)]
Remove the "merge in progress" notice

12 years agoUse proper modifiers for size_t printing.
Karl Palsson [Wed, 1 Feb 2012 21:05:06 +0000 (21:05 +0000)]
Use proper modifiers for size_t printing.

Eliminates build warnings.

12 years agoUnify chipid naming convention.
Karl Palsson [Wed, 1 Feb 2012 20:55:10 +0000 (20:55 +0000)]
Unify chipid naming convention.

Flag more duplicate variables that need to be removed/combined

12 years agoMerge pull request #52 from UweBonnes/master
texane [Tue, 31 Jan 2012 17:11:35 +0000 (09:11 -0800)]
Merge pull request #52 from UweBonnes/master

Fixes around F4

12 years agoMerge pull request #51 from DanielO/master
texane [Tue, 31 Jan 2012 17:11:04 +0000 (09:11 -0800)]
Merge pull request #51 from DanielO/master

Use pkg-config to find libusb

12 years agoMerge branch 'master' of github.com:UweBonnes/stlink
Uwe Bonnes [Tue, 31 Jan 2012 10:39:55 +0000 (11:39 +0100)]
Merge branch 'master' of github.com:UweBonnes/stlink

12 years agoUse pkg-config to find libusb CFLAGS and LDFLAGS.
Daniel O'Connor [Tue, 31 Jan 2012 06:19:45 +0000 (16:49 +1030)]
Use pkg-config to find libusb CFLAGS and LDFLAGS.

12 years agoLimit reading from RAM to the SRAM Size
Uwe Bonnes [Mon, 30 Jan 2012 12:32:18 +0000 (13:32 +0100)]
Limit reading from RAM to the SRAM Size

12 years agoGive a different error when writing to flash or ram
Uwe Bonnes [Sun, 29 Jan 2012 13:21:26 +0000 (14:21 +0100)]
Give a different error when writing to flash or ram

12 years agoCoreIF for F2/F4 is not different, use CPUID to distinguish. F4 errata seems to give...
Uwe Bonnes [Sat, 28 Jan 2012 03:46:22 +0000 (04:46 +0100)]
CoreIF for F2/F4 is not different, use CPUID to distinguish. F4 errata seems to give wrong workaround

12 years agoFix writing to SRAM on F1. Blocksize greater 0x1800 stalls STLINKV2. V1 needs to...
Uwe Bonnes [Fri, 27 Jan 2012 19:26:32 +0000 (20:26 +0100)]
Fix writing to SRAM on F1. Blocksize greater 0x1800 stalls STLINKV2. V1 needs to be checked!

12 years agoFix mass erase of F4
Uwe Bonnes [Tue, 24 Jan 2012 12:21:47 +0000 (13:21 +0100)]
Fix mass erase of F4

12 years agoF1 set_flash_cr_strt unconditionally set the PER bit and so mass erase didn't work
Uwe Bonnes [Fri, 20 Jan 2012 16:25:01 +0000 (17:25 +0100)]
F1 set_flash_cr_strt unconditionally set the PER bit and so mass erase didn't work

12 years agoMerge pull request #49 from UweBonnes/master
texane [Thu, 19 Jan 2012 20:59:27 +0000 (12:59 -0800)]
Merge pull request #49 from UweBonnes/master

Allow to write to ram and start loaded programs.

12 years agoA blank STM32L151 refused half-page writing. Fall back to half-word writing in
Uwe Bonnes [Thu, 19 Jan 2012 14:45:51 +0000 (15:45 +0100)]
A blank STM32L151 refused half-page writing. Fall back to half-word writing in
that case. Report advance in half-word writing. Setting stack and PC give
access error so automatic start fails too and hardware needs to be hard-reset
to start

12 years agoMake stlink_erase_flash_mass device dependant and implement mass erase for L1
Uwe Bonnes [Thu, 19 Jan 2012 13:59:02 +0000 (14:59 +0100)]
Make stlink_erase_flash_mass device dependant and implement mass erase for L1
by consecutive page erase
Allow to erase the device with the flash

12 years agoWhen loading a file to SRAM or Flash, set the Stack pointer with the initial
Uwe Bonnes [Thu, 19 Jan 2012 13:17:22 +0000 (14:17 +0100)]
When loading a file to SRAM or Flash, set the Stack pointer with the initial
SP value and the Program counter with the reset value from the Vector
table. Then run reset function

12 years agoAllow to write to sram from the command line
Uwe Bonnes [Thu, 19 Jan 2012 13:07:14 +0000 (14:07 +0100)]
Allow to write to sram from the command line

12 years agoStore the masked chip_id in the stlink structure. Should fix unexpected
Uwe Bonnes [Thu, 19 Jan 2012 12:55:00 +0000 (13:55 +0100)]
Store the masked chip_id in the stlink structure. Should fix unexpected
behaviour with L1 and F2

12 years agoUse stlink_r|w_debug32 for single word access in the gdbserver too
Uwe Bonnes [Thu, 19 Jan 2012 12:47:23 +0000 (13:47 +0100)]
Use stlink_r|w_debug32 for single word access in the gdbserver too

12 years ago[fix] format warning on 32 bits
le mentec fabien [Wed, 18 Jan 2012 15:58:54 +0000 (09:58 -0600)]
[fix] format warning on 32 bits

12 years agoMerge branch 'master' of git://github.com/texane/stlink
Uwe Bonnes [Wed, 18 Jan 2012 09:52:01 +0000 (10:52 +0100)]
Merge branch 'master' of git://github.com/texane/stlink

Conflicts:
gdbserver/Makefile

12 years agoAdd dependancy from stlink.a
Uwe Bonnes [Tue, 17 Jan 2012 20:55:10 +0000 (21:55 +0100)]
Add dependancy from stlink.a

12 years agoAs write_buffer_to_sram() can now handles arbitrary size, use flash_pgsz chunks for...
Uwe Bonnes [Tue, 17 Jan 2012 20:43:58 +0000 (21:43 +0100)]
As write_buffer_to_sram() can now handles arbitrary size, use flash_pgsz chunks for writing F1 and reduce output

12 years agoEnable half_page write for STM32L
Uwe Bonnes [Tue, 17 Jan 2012 20:28:36 +0000 (21:28 +0100)]
Enable half_page write for STM32L

12 years agoIn write_buffer_to_sram() write as much as possible with write_mem32
Uwe Bonnes [Tue, 17 Jan 2012 20:24:01 +0000 (21:24 +0100)]
In write_buffer_to_sram() write as much as possible with write_mem32

12 years agowrite_mem8 with more than 0x40 bytes gives unexpected results
Uwe Bonnes [Tue, 17 Jan 2012 20:17:02 +0000 (21:17 +0100)]
write_mem8 with more than 0x40 bytes gives unexpected results

12 years agoSome L1 flash address was off by 0x10, but is never used
Uwe Bonnes [Tue, 17 Jan 2012 14:44:17 +0000 (15:44 +0100)]
Some L1 flash address was off by 0x10, but is never used

12 years agoLess noisy output for STM32L erase/program, but still showing progess
Uwe Bonnes [Fri, 13 Jan 2012 18:16:15 +0000 (19:16 +0100)]
Less noisy output for STM32L erase/program, but still showing progess

12 years ago[fix] valueless return warning
Fabien Le Mentec [Wed, 4 Jan 2012 06:55:47 +0000 (00:55 -0600)]
[fix] valueless return warning

12 years agoAdded the library to the list of dependencies as in flash
Friedrich Beckmann [Tue, 3 Jan 2012 22:58:01 +0000 (23:58 +0100)]
Added the library to the list of dependencies as in flash

12 years agomoved the device parameter loading at the end of initialization for V1 devices- fixed...
Friedrich Beckmann [Tue, 3 Jan 2012 22:52:44 +0000 (23:52 +0100)]
moved the device parameter loading at the end of initialization for V1 devices- fixed the problem of non working V1 devices

12 years agoMove reset/load_param in the open functions, as requested by Karl
Uwe Bonnes [Sun, 18 Dec 2011 22:35:20 +0000 (23:35 +0100)]
Move reset/load_param in the open functions, as requested by Karl

12 years agoFor gdbserver, use the same initialization sequence like for flashing
Uwe Bonnes [Sun, 18 Dec 2011 20:44:40 +0000 (21:44 +0100)]
For gdbserver, use the same initialization sequence like for flashing

12 years agoAdd a TODO to check for Supply Voltage before setting F4 paralleisme to 32 bits
Uwe Bonnes [Sun, 18 Dec 2011 18:24:32 +0000 (19:24 +0100)]
Add a TODO to check for Supply Voltage before setting F4 paralleisme to 32 bits

12 years agoIf no read size is given, read the whole flash
Uwe Bonnes [Sun, 18 Dec 2011 18:13:46 +0000 (19:13 +0100)]
If no read size is given, read the whole flash

12 years agoClip flash read request to maximum flash size
Uwe Bonnes [Sun, 18 Dec 2011 18:03:58 +0000 (19:03 +0100)]
Clip flash read request to maximum flash size

12 years agoWhile L1 has empty flash cell erased to zero, at least F1/F4 are erased to 0xff.
Uwe Bonnes [Sun, 18 Dec 2011 17:47:21 +0000 (18:47 +0100)]
While L1 has empty flash cell erased to zero, at least F1/F4 are erased to 0xff.

12 years agoAlso ignore ZEROs at end of file when writing
Uwe Bonnes [Sun, 18 Dec 2011 15:53:16 +0000 (16:53 +0100)]
Also ignore ZEROs at end of file when writing

12 years agoIgnore NULL bytes at flash end when reading
Uwe Bonnes [Sun, 18 Dec 2011 15:34:16 +0000 (16:34 +0100)]
Ignore NULL bytes at flash end when reading

12 years agoReplace remaining _mem32 single word accesses with _debug32
Uwe Bonnes [Sun, 18 Dec 2011 14:40:09 +0000 (15:40 +0100)]
Replace remaining _mem32 single word accesses with _debug32

12 years agoFix a wrong placed brace and and a not replaced stlink_write_mem32() that keep
Uwe Bonnes [Sun, 18 Dec 2011 14:21:26 +0000 (15:21 +0100)]
Fix a wrong placed brace and and a not replaced stlink_write_mem32() that keep
STM32L from programming

12 years agoPage erase for STM32L needs a real write to lowest address with 0. stink_write_mem...
Uwe Bonnes [Sun, 18 Dec 2011 14:03:51 +0000 (15:03 +0100)]
Page erase for STM32L needs a real write to lowest address with 0. stink_write_mem(.., ..,0) is undedined

12 years ago[update] stlinkv1_macosx_driver/README
Fabien Le Mentec [Fri, 16 Dec 2011 20:28:15 +0000 (14:28 -0600)]
[update] stlinkv1_macosx_driver/README

12 years ago[update] AUTHOR
Fabien Le Mentec [Fri, 16 Dec 2011 20:07:38 +0000 (14:07 -0600)]
[update] AUTHOR

12 years ago[add] stlinkv1_macosx_driver from marco.cassinerio@gmail.com
Fabien Le Mentec [Fri, 16 Dec 2011 20:07:17 +0000 (14:07 -0600)]
[add] stlinkv1_macosx_driver from marco.cassinerio@gmail.com

12 years agoMerge pull request #36 from UweBonnes/master
texane [Tue, 13 Dec 2011 19:53:08 +0000 (11:53 -0800)]
Merge pull request #36 from UweBonnes/master

This batch implements and exposes the single data word access, jJTAG NRST and makes the F107 work when in Sleep mode.

12 years agoUse the single word accesses in the flash inner loop too. We first swap the data...
Uwe Bonnes [Tue, 13 Dec 2011 19:35:32 +0000 (20:35 +0100)]
Use the single word accesses in the flash inner loop too. We first swap the data, then the access routine swaps the data again, but cycles are cheep and so don't need another access function

12 years agoUse the single WORD memory access
Uwe Bonnes [Tue, 13 Dec 2011 18:56:10 +0000 (19:56 +0100)]
Use the single WORD memory access

12 years agoModify shutdown seqeunce. Now a F107 in sleep mode reacts on the reset pin after...
Uwe Bonnes [Tue, 13 Dec 2011 17:41:07 +0000 (18:41 +0100)]
Modify shutdown seqeunce. Now a F107 in sleep mode reacts on the reset pin after running stlink

12 years agoDetermine the device parameters explicit after running
Uwe Bonnes [Tue, 13 Dec 2011 16:48:54 +0000 (17:48 +0100)]
Determine the device parameters explicit after running
stlink_reset(). Otherwise a sleeping device (WFI) doesn't return the
parameters.

12 years agoImplement and expose single 32 memory read/write
Uwe Bonnes [Tue, 13 Dec 2011 12:27:32 +0000 (13:27 +0100)]
Implement and expose single 32 memory read/write

12 years agoMerge pull request #35 from UweBonnes/master
texane [Mon, 12 Dec 2011 17:05:14 +0000 (09:05 -0800)]
Merge pull request #35 from UweBonnes/master

Some cleanup patches (crashes on bad command lines, freeing of buffers, compiling dependancies...)

12 years agoExpose JTAG NRST
Uwe Bonnes [Mon, 12 Dec 2011 14:22:19 +0000 (15:22 +0100)]
Expose JTAG NRST

12 years agoMore files to ignore
Uwe Bonnes [Sat, 10 Dec 2011 20:27:54 +0000 (21:27 +0100)]
More files to ignore

12 years agoPrint undecode chip_id too
Uwe Bonnes [Sat, 10 Dec 2011 18:01:52 +0000 (19:01 +0100)]
Print undecode chip_id too

12 years agoAdd explicit dependancy on the stlink archive
Uwe Bonnes [Sat, 10 Dec 2011 17:22:51 +0000 (18:22 +0100)]
Add explicit dependancy on the stlink archive

12 years agoFix leakage pathes for V1
Uwe Bonnes [Sat, 10 Dec 2011 17:08:06 +0000 (18:08 +0100)]
Fix leakage pathes for  V1

12 years agoFix memory leakage pathe with no V2 device found
Uwe Bonnes [Sat, 10 Dec 2011 16:59:20 +0000 (17:59 +0100)]
Fix memory leakage pathe with no V2 device found

12 years agoChevck first for NULL before writing anything to the alloceted structure
Uwe Bonnes [Sat, 10 Dec 2011 16:17:25 +0000 (17:17 +0100)]
Chevck first for NULL before writing anything to the alloceted structure

12 years agoOnly call strtoul when there is an argument that strtoul can work on
Uwe Bonnes [Sat, 10 Dec 2011 16:15:48 +0000 (17:15 +0100)]
Only call strtoul when there is an argument that strtoul can work on

12 years ago[update] apply patches from marpe@mimuw.edu.pl: stlink-sg.c unused/uninitialized...
le mentec fabien [Tue, 22 Nov 2011 16:04:36 +0000 (10:04 -0600)]
[update] apply patches from marpe@mimuw.edu.pl: stlink-sg.c unused/uninitialized variables

12 years ago[update] apply patches from marpe@mimuw.edu.pl: strict aliasing issues, busy bit...
le mentec fabien [Tue, 22 Nov 2011 15:54:55 +0000 (09:54 -0600)]
[update] apply patches from marpe@mimuw.edu.pl: strict aliasing issues, busy bit waiting

12 years ago[update] apply patches from marpe@mimuw.edu.pl for flash tool: verbosity, run after...
le mentec fabien [Tue, 22 Nov 2011 15:39:58 +0000 (09:39 -0600)]
[update] apply patches from marpe@mimuw.edu.pl for flash tool: verbosity, run after programm\

12 years ago[update] blink_flash makefile
Fabien Le Mentec [Sun, 20 Nov 2011 21:54:00 +0000 (15:54 -0600)]
[update] blink_flash makefile

12 years agoMerge pull request #29 from karlp/future_f1plusf4
texane [Tue, 15 Nov 2011 20:40:23 +0000 (12:40 -0800)]
Merge pull request #29 from karlp/future_f1plusf4

Eliminate SCSI pass through, fix F1 targets again, valgrind all the goodies

12 years agoFix merge problem with flash verify for F4
Karl Palsson [Tue, 15 Nov 2011 19:56:14 +0000 (19:56 +0000)]
Fix merge problem with flash verify for F4

The F4 code had #ifdefd out the verification, as the page/sector size can be
too large to read in via a single transfer.  Pull the verification out to a
separate function, the flash write was getting far too large anyway.

12 years agoMerge branch 'tmaster' into future
Karl Palsson [Tue, 15 Nov 2011 00:57:09 +0000 (00:57 +0000)]
Merge branch 'tmaster' into future

This branch should work for F1 and F4 devices.  It has currently been tested
with F1 value line, (a VL discovery board) programmed via gdb via both an
stlinkv1 and an stlinkv2.

F4 has _not_ yet been tested on this branch

Conflicts:
.gitignore
doc/tutorial/tutorial.pdf
example/blink/main.c
gdbserver/Makefile
gdbserver/gdb-server.c
src/stlink-common.c
src/stlink-common.h
src/stlink-usb.c

12 years agoMerge remote branch 'origin/libwork2'
Karl Palsson [Mon, 14 Nov 2011 23:50:18 +0000 (23:50 +0000)]
Merge remote branch 'origin/libwork2'

12 years agoUpdate readme, as this is about to get messy!
Karl Palsson [Mon, 14 Nov 2011 23:32:50 +0000 (23:32 +0000)]
Update readme, as this is about to get messy!

12 years agoRemove final reference to old sg/usb compilation flags
Karl Palsson [Mon, 14 Nov 2011 23:01:03 +0000 (23:01 +0000)]
Remove final reference to old sg/usb compilation flags

12 years agoMerge pull request #28 from jnosky/master
texane [Mon, 14 Nov 2011 21:32:02 +0000 (13:32 -0800)]
Merge pull request #28 from jnosky/master

Added code for gdbserver to support the full flash size of the STM32F4

12 years agoAdded code so gdbserver can fully support the STM32F4 variable page sizes
jnosky [Mon, 14 Nov 2011 21:20:49 +0000 (16:20 -0500)]
Added code so gdbserver can fully support the STM32F4 variable page sizes

gdbserver can now upload up to 1MB projects to flash

12 years agoChanged size argument to hex
jnosky [Mon, 14 Nov 2011 21:16:57 +0000 (16:16 -0500)]
Changed size argument to hex

Address was hex, size was decimal. Now uniform to be hex

12 years agoRemoved comment about STM32F4 limitations
jnosky [Mon, 14 Nov 2011 21:15:31 +0000 (16:15 -0500)]
Removed comment about STM32F4 limitations

12 years agoMerge pull request #27 from csamuelson/master
texane [Mon, 14 Nov 2011 06:16:45 +0000 (22:16 -0800)]
Merge pull request #27 from csamuelson/master

Unable to compile STM32F4 discovery_demo on Linux

12 years agoKeep netbeans happy
Karl Palsson [Mon, 14 Nov 2011 04:14:41 +0000 (04:14 +0000)]
Keep netbeans happy

12 years agoFix memory leaks closing v1 hardware.
Karl Palsson [Mon, 14 Nov 2011 04:12:49 +0000 (04:12 +0000)]
Fix memory leaks closing v1 hardware.

Thanks valgrind

12 years agoRemove dead code and unused variables
Karl Palsson [Mon, 14 Nov 2011 04:12:29 +0000 (04:12 +0000)]
Remove dead code and unused variables

12 years agoTurn down default logging level.
Karl Palsson [Mon, 14 Nov 2011 04:11:10 +0000 (04:11 +0000)]
Turn down default logging level.

And remove dead/duplicate code that is included in the opening of the device

12 years agoStart up stlinkv1 faster.
Karl Palsson [Mon, 14 Nov 2011 03:52:19 +0000 (03:52 +0000)]
Start up stlinkv1 faster.

Now that we're not using sg, and we've told the kernel to ignore the device in
usb-mass storage, we don't need to close and wait 5 seconds.  We can just
immediately issue the command to switch modes.

12 years agoRemove lots of dead code and superfluous trace
Karl Palsson [Mon, 14 Nov 2011 03:47:47 +0000 (03:47 +0000)]
Remove lots of dead code and superfluous trace

Lots of the debug code is far too verbose for anything but usb tracing.
Likewise, remove all the old scsi code that was simply ifdefd out.

12 years agoNote that many of these "examples" are busted
Karl Palsson [Mon, 14 Nov 2011 03:24:12 +0000 (03:24 +0000)]
Note that many of these "examples" are busted