fw/stlink
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

12 years agoSTM32F4 discovery_demo Makefile needed correct capitalization for Linux
Chris Samuelson [Mon, 14 Nov 2011 03:20:30 +0000 (21:20 -0600)]
STM32F4 discovery_demo Makefile needed correct capitalization for Linux

12 years agoRemove confusing distclean/clean dichotomy
Karl Palsson [Mon, 14 Nov 2011 03:03:07 +0000 (03:03 +0000)]
Remove confusing distclean/clean dichotomy

in the top level, make clean cleans all stlink code.
in an application level, it only cleans that application

12 years agoStart to keep an uptodate list of what's been tested in what combinations
Karl Palsson [Mon, 14 Nov 2011 02:59:38 +0000 (02:59 +0000)]
Start to keep an uptodate list of what's been tested in what combinations

12 years agoDon't refetch the chip id on every single page erase.
Karl Palsson [Sat, 12 Nov 2011 18:21:46 +0000 (18:21 +0000)]
Don't refetch the chip id on every single page erase.

And update some of the logging to be a bit tidier

12 years agoFix linking with new names
Karl Palsson [Tue, 8 Nov 2011 01:13:50 +0000 (01:13 +0000)]
Fix linking with new names

12 years agoAdding original source of vl factory demo
Karl Palsson [Tue, 8 Nov 2011 01:13:21 +0000 (01:13 +0000)]
Adding original source of vl factory demo

It compiles, but I've got bugs preventing me from running this yet :(

12 years agoBuild libraries for stm32l1xx and stm32f10x
Karl Palsson [Tue, 8 Nov 2011 00:57:54 +0000 (00:57 +0000)]
Build libraries for stm32l1xx and stm32f10x

These libraries IGNORE assert_param.  Maybe later.

12 years agoFix compile error with new libraries
Karl Palsson [Mon, 7 Nov 2011 22:56:34 +0000 (22:56 +0000)]
Fix compile error with new libraries

12 years agoRename board specific demos as appropriate
Karl Palsson [Mon, 7 Nov 2011 22:56:15 +0000 (22:56 +0000)]
Rename board specific demos as appropriate

12 years agoRename 32L specific examples
Karl Palsson [Mon, 7 Nov 2011 22:55:20 +0000 (22:55 +0000)]
Rename 32L specific examples

12 years agoRestructure libs source to support multi platform
Karl Palsson [Mon, 7 Nov 2011 22:00:13 +0000 (22:00 +0000)]
Restructure libs source to support multi platform

The "libstm32l_discovery" was actually the ST std periph library, plus the
CMSIS core files.  Renamed it as such, and restructured the directories and
naming to make this easier to contain the std periph drivers for more than
just one board.

Verified with the LCD demo makefile, and loading it in sram again.

12 years agoDon't try reading device params in bad USB modes.
Karl Palsson [Mon, 14 Nov 2011 02:25:31 +0000 (02:25 +0000)]
Don't try reading device params in bad USB modes.

You cannot read device params when we're not in debug mode and trying to will fill the USB buffer with garbage, and you will have to
unplug and replug and start again.  (which will fail, because, you're in the
wrong mode... :)

12 years agoFix flash writing for VL cores.
Karl Palsson [Mon, 14 Nov 2011 01:25:56 +0000 (01:25 +0000)]
Fix flash writing for VL cores.

The change from run->step breaks the VL cores.  Need to double check that this
still works for L cores.  The whole flash writing needs to be better
abstracted.

Lots more informational debug.

12 years agoMerge pull request #25 from jnosky/master
texane [Sun, 13 Nov 2011 07:22:44 +0000 (23:22 -0800)]
Merge pull request #25 from jnosky/master

Examples directory update for stm32f4

12 years agoAdded note about STM32F4 flash support
jnosky [Sat, 12 Nov 2011 22:02:18 +0000 (17:02 -0500)]
Added note about STM32F4 flash support

12 years agoAdd STM32F4 discovery board demo and make file
jnosky [Sat, 12 Nov 2011 21:48:49 +0000 (16:48 -0500)]
Add STM32F4 discovery board demo and make file

12 years agoAdded IO_Toggle demo and make file
jnosky [Sat, 12 Nov 2011 21:48:23 +0000 (16:48 -0500)]
Added IO_Toggle demo and make file

12 years agoAdded STM32F4xx Std Periph driver source and make file
jnosky [Sat, 12 Nov 2011 21:41:46 +0000 (16:41 -0500)]
Added STM32F4xx Std Periph driver source and make file

12 years agoRemoved binaries
jnosky [Sat, 12 Nov 2011 21:38:17 +0000 (16:38 -0500)]
Removed binaries

12 years agoAdded IO_Toggle demo sources and make file
jnosky [Sat, 12 Nov 2011 21:22:49 +0000 (16:22 -0500)]
Added IO_Toggle demo sources and make file

12 years agoAdded STM32F4 discovery demo sources and make file
jnosky [Sat, 12 Nov 2011 21:22:03 +0000 (16:22 -0500)]
Added STM32F4 discovery demo sources and make file

12 years agoAdded USB Device library sources
jnosky [Sat, 12 Nov 2011 21:21:04 +0000 (16:21 -0500)]
Added USB Device library sources

12 years agoAdded USB Host library sources
jnosky [Sat, 12 Nov 2011 21:20:02 +0000 (16:20 -0500)]
Added USB Host library sources

12 years agoAdded STM32F4xx StdPeriph Driver sources
jnosky [Sat, 12 Nov 2011 21:19:17 +0000 (16:19 -0500)]
Added STM32F4xx StdPeriph Driver sources

12 years agoAdded USB OTG Driver sources
jnosky [Sat, 12 Nov 2011 21:17:43 +0000 (16:17 -0500)]
Added USB OTG Driver sources

12 years agoAdded STM32F4-Discovery utilities
jnosky [Sat, 12 Nov 2011 21:17:03 +0000 (16:17 -0500)]
Added STM32F4-Discovery utilities

12 years agoAdded my email
jnosky [Sat, 12 Nov 2011 21:16:15 +0000 (16:16 -0500)]
Added my email

12 years agoRead chip and core id in device param loading.
Karl Palsson [Sat, 12 Nov 2011 20:45:41 +0000 (20:45 +0000)]
Read chip and core id in device param loading.

Instead of expecting everyone to read it every time they need to check it.
Just assume it's always there.

12 years agoMove all the flash size mapping from gdb server into core.
Karl Palsson [Sat, 12 Nov 2011 20:36:43 +0000 (20:36 +0000)]
Move all the flash size mapping from gdb server into core.

All the device params like flash size and page size should all be in the core open routines, not
_only_ in the gdbserver.  (This should stop it from ending up duplicated in the core, and get rid of
some of the hacks that were turning up.  All of this is chip specific!)

12 years ago[merge] merge jnosky/master
Fabien Le Mentec [Sat, 12 Nov 2011 08:25:02 +0000 (02:25 -0600)]
[merge] merge jnosky/master

12 years agoMerge branch 'jnosky/master'
Fabien Le Mentec [Sat, 12 Nov 2011 07:49:08 +0000 (01:49 -0600)]
Merge branch 'jnosky/master'

12 years agoMerge branch 'master' of github.com:karlp/stlink
Karl Palsson [Fri, 11 Nov 2011 22:59:44 +0000 (22:59 +0000)]
Merge branch 'master' of github.com:karlp/stlink

12 years agoFinish removing sg-utils dependencies.
Karl Palsson [Fri, 11 Nov 2011 15:38:09 +0000 (15:38 +0000)]
Finish removing sg-utils dependencies.

The code deps were removed, but the flags stayed in some makefiles.

12 years agoMerge pull request #1 from PetteriAimonen/master
Karl Palsson [Fri, 11 Nov 2011 15:30:21 +0000 (07:30 -0800)]
Merge pull request #1 from PetteriAimonen/master

Here is a fix for the register bug :)

12 years agoChanged chip detection method
jnosky [Fri, 11 Nov 2011 01:15:06 +0000 (20:15 -0500)]
Changed chip detection method

Future plan to detect chip ID rather than core ID

12 years agoTemp fix to work with F4 up to 64k of flash, changed chip detection
jnosky [Fri, 11 Nov 2011 01:12:29 +0000 (20:12 -0500)]
Temp fix to work with F4 up to 64k of flash, changed chip detection

Can debug with up to 64k flash on the F4

12 years agoAdded the IO_Toggle and discovery demo samples including a working make
jnosky [Fri, 11 Nov 2011 01:09:20 +0000 (20:09 -0500)]
Added the IO_Toggle and discovery demo samples including a working make

Can now build and flash these these samples

12 years agoAdded all the F4 libraries to the project
jnosky [Fri, 11 Nov 2011 01:06:27 +0000 (20:06 -0500)]
Added all the F4 libraries to the project

Allows the F4 discovery examples to be built

12 years agoFixed a bug that caused gdb to display wrong registers when using stlink ver 1.
Petteri Aimonen [Thu, 10 Nov 2011 19:38:16 +0000 (21:38 +0200)]
Fixed a bug that caused gdb to display wrong registers when using stlink ver 1.

12 years ago[merge] Ned Konz, Fixed spelling and added files to .gitignore
Fabien Le Mentec [Wed, 9 Nov 2011 06:25:55 +0000 (00:25 -0600)]
[merge] Ned Konz, Fixed spelling and added files to .gitignore

12 years agoMerge pull request #21 from bravikov/master
texane [Tue, 8 Nov 2011 06:13:05 +0000 (22:13 -0800)]
Merge pull request #21 from bravikov/master

[fix] parsing command line and sg autodetection

12 years ago[fix] parsing command line and sg autodetection
Dmitry Bravikov [Tue, 8 Nov 2011 03:41:43 +0000 (09:41 +0600)]
[fix] parsing command line and sg autodetection

12 years ago[update] add bravikov@gmail.com to AUTHORS
Fabien Le Mentec [Sun, 6 Nov 2011 18:22:59 +0000 (12:22 -0600)]
[update] add bravikov@gmail.com to AUTHORS

12 years agoParsing the arguments of command line
Dmitry Bravikov [Sun, 6 Nov 2011 17:26:12 +0000 (23:26 +0600)]
Parsing the arguments of command line

12 years agoMerge branch 'master' of https://github.com/texane/stlink
Karl Palsson [Fri, 4 Nov 2011 02:51:15 +0000 (02:51 +0000)]
Merge branch 'master' of https://github.com/texane/stlink

Conflicts:
Makefile
doc/tutorial/tutorial.pdf
example/blink/Makefile
flash/main.c
src/stlink-common.c
src/stlink-usb.c

Mostly whitespace conflicts it seems.

12 years agonetbeans project update for flash utility
Karl Palsson [Fri, 4 Nov 2011 02:31:17 +0000 (02:31 +0000)]
netbeans project update for flash utility

12 years agoInclude a udev rules file for v1 boards too, for permissions
Karl Palsson [Fri, 4 Nov 2011 02:30:13 +0000 (02:30 +0000)]
Include a udev rules file for v1 boards too, for permissions

12 years agoUpdate tutorial docs and flash writing/reading
Karl Palsson [Fri, 4 Nov 2011 02:23:17 +0000 (02:23 +0000)]
Update tutorial docs and flash writing/reading