pyfrprog.git
10 years agomake: check if git is available before calculate version master
Bernhard Urban [Fri, 7 May 2010 14:29:18 +0000 (16:29 +0200)]
make: check if git is available before calculate version

10 years agomake: ignore warnings until we fix it (new buildtools released by fujitsu)
Bernhard Urban [Fri, 30 Apr 2010 13:53:42 +0000 (15:53 +0200)]
make: ignore warnings until we fix it (new buildtools released by fujitsu)
make: copy *.py instead *.pcy
make: fromdos fix for ubuntu 10.04 LTS

10 years agosome fixes, pointed out by pylint
Bernhard Urban [Sun, 25 Apr 2010 12:40:04 +0000 (14:40 +0200)]
some fixes, pointed out by pylint

... however, I wasn't able to eliminate all warnings, because
I'm actually a python noob :)

10 years agonicer led output
Bernhard Urban [Sat, 24 Apr 2010 19:13:29 +0000 (21:13 +0200)]
nicer led output

10 years agobe less verbose
Bernhard Urban [Sat, 24 Apr 2010 19:13:19 +0000 (21:13 +0200)]
be less verbose

10 years agotimeout fix
Bernhard Urban [Thu, 15 Apr 2010 16:41:58 +0000 (18:41 +0200)]
timeout fix

10 years agocheck for argument "-d" if len(argv) is 4
theStack [Sun, 31 Jan 2010 14:21:15 +0000 (15:21 +0100)]
check for argument "-d" if len(argv) is 4

we can use getopt (http://docs.python.org/library/getopt.html)
instead of manual parsing if the number of options increases
in the future...

10 years agoadded version option
Bernhard Urban [Sun, 31 Jan 2010 00:06:10 +0000 (01:06 +0100)]
added version option

10 years agoadded device option v0.1
Bernhard Urban [Sat, 30 Jan 2010 23:53:33 +0000 (00:53 +0100)]
added device option

10 years agotty must be global
Bernhard Urban [Sun, 3 Jan 2010 14:16:08 +0000 (15:16 +0100)]
tty must be global

10 years agoimproved structure, add main() function
theStack [Fri, 1 Jan 2010 19:11:38 +0000 (20:11 +0100)]
improved structure, add main() function

see http://python.net/~goodger/projects/pycon/2007/idiomatic/handout.html#module-structure
and http://www.artima.com/weblogs/viewpost.jsp?thread=4829

10 years agosmall README changes + USPP lib mention
theStack [Sat, 19 Dec 2009 13:49:24 +0000 (14:49 +0100)]
small README changes + USPP lib mention

10 years agomake install && README
Bernhard Urban [Fri, 18 Dec 2009 16:28:52 +0000 (17:28 +0100)]
make install && README

10 years agoadd time measurement for performance comparisons
theStack [Tue, 15 Dec 2009 20:41:50 +0000 (21:41 +0100)]
add time measurement for performance comparisons

10 years agorenamed 'cmd' functions...
Bernhard Urban [Tue, 15 Dec 2009 03:24:16 +0000 (04:24 +0100)]
renamed 'cmd' functions...

10 years agodecreased wait-time for pkernel + mini cleanup
theStack [Tue, 15 Dec 2009 02:25:10 +0000 (03:25 +0100)]
decreased wait-time for pkernel + mini cleanup

10 years agosendByte() is now free of senseless sleeping -> speed increase! \o/
theStack [Tue, 15 Dec 2009 02:07:10 +0000 (03:07 +0100)]
sendByte() is now free of senseless sleeping -> speed increase! \o/

sleeping just *once* after telling the bootloader to set a new baudrate is sufficient!

10 years agosendByte()-sleep is only needed in bootloader-mode
theStack [Tue, 15 Dec 2009 01:59:35 +0000 (02:59 +0100)]
sendByte()-sleep is only needed in bootloader-mode

10 years agodeleted (uncommented, but anyway...) tests
theStack [Tue, 15 Dec 2009 01:54:24 +0000 (02:54 +0100)]
deleted (uncommented, but anyway...) tests

< 260 loc remain for the whole flasher - python rocks! :)

10 years agotwo become one ;) merged kernel.py into frprog.py
theStack [Tue, 15 Dec 2009 01:50:53 +0000 (02:50 +0100)]
two become one ;) merged kernel.py into frprog.py

10 years agoreadMHX() now takes filename instead of fp
theStack [Tue, 15 Dec 2009 01:09:04 +0000 (02:09 +0100)]
readMHX() now takes filename instead of fp

10 years agoMerge branch 'master' of wien.tomnetworks.com:pyfrprog
theStack [Mon, 14 Dec 2009 13:48:45 +0000 (14:48 +0100)]
Merge branch 'master' of wien.tomnetworks.com:pyfrprog

10 years agocamelcase fct name + removed useless comment
theStack [Mon, 14 Dec 2009 13:48:16 +0000 (14:48 +0100)]
camelcase fct name + removed useless comment

(yes that was pedantic)

10 years agofrprog.py: created function read_mhx_file
theStack [Mon, 14 Dec 2009 13:44:38 +0000 (14:44 +0100)]
frprog.py: created function read_mhx_file

10 years agoMerge branch 'master' of wien.tomnetworks.com:pyfrprog
Bernhard Urban [Mon, 14 Dec 2009 13:44:20 +0000 (14:44 +0100)]
Merge branch 'master' of wien.tomnetworks.com:pyfrprog

10 years agoomg, this preprocessor really fails
Bernhard Urban [Mon, 14 Dec 2009 13:44:13 +0000 (14:44 +0100)]
omg, this preprocessor really fails

10 years agocleaned up cmdBAUDRATE
theStack [Mon, 14 Dec 2009 13:35:05 +0000 (14:35 +0100)]
cleaned up cmdBAUDRATE

10 years ago-rw-r--r-- 1 lewurm lewurm 4244 2009-12-14 14:17 pkernel/pkernel.mhx
Bernhard Urban [Mon, 14 Dec 2009 13:18:13 +0000 (14:18 +0100)]
-rw-r--r-- 1 lewurm lewurm  4244 2009-12-14 14:17 pkernel/pkernel.mhx

10 years agocleanup
Bernhard Urban [Mon, 14 Dec 2009 13:05:18 +0000 (14:05 +0100)]
cleanup

-rw-r--r-- 1 lewurm lewurm 5620 2009-12-14 14:12 pkernel.mhx

10 years agoonly flush once for a sequence, detect 0xffs seqs
theStack [Mon, 14 Dec 2009 12:07:47 +0000 (13:07 +0100)]
only flush once for a sequence, detect 0xffs seqs

10 years agoremoved some asm code
Bernhard Urban [Mon, 14 Dec 2009 09:12:43 +0000 (10:12 +0100)]
removed some asm code

10 years agofaster baudrate for pkernel
Bernhard Urban [Mon, 14 Dec 2009 09:08:26 +0000 (10:08 +0100)]
faster baudrate for pkernel

10 years agomoved kerlen.py
Bernhard Urban [Mon, 14 Dec 2009 08:57:31 +0000 (09:57 +0100)]
moved kerlen.py

10 years agoadded further exit function, so the board restarts after reset
Bernhard Urban [Mon, 14 Dec 2009 08:53:20 +0000 (09:53 +0100)]
added further exit function, so the board restarts after reset

10 years agoRevert "added receivebyte with timeout. sometimes it will just hang,"
Bernhard Urban [Mon, 14 Dec 2009 08:49:26 +0000 (09:49 +0100)]
Revert "added receivebyte with timeout. sometimes it will just hang,"

This reverts commit 97455c66228fca7dfc8d0b1f397e01e98f1e3b6c.

10 years agoMerge branch 'master' of wien.tomnetworks.com:pyfrprog
Bernhard Urban [Mon, 14 Dec 2009 08:47:29 +0000 (09:47 +0100)]
Merge branch 'master' of wien.tomnetworks.com:pyfrprog

10 years agoremoved some unnecessary interrupt-related flashfunctions (because we
Bernhard Urban [Mon, 14 Dec 2009 08:46:14 +0000 (09:46 +0100)]
removed some unnecessary interrupt-related flashfunctions (because we
don't even use interrupts in pkernel)

10 years agoadded receivebyte with timeout. sometimes it will just hang,
Bernhard Urban [Mon, 14 Dec 2009 08:36:49 +0000 (09:36 +0100)]
added receivebyte with timeout. sometimes it will just hang,
unfortuanetly this isn't useful, since the MC hangs in a flashroutine...
hmpf :/

10 years agokernel.py: disable timeout (having blocking read)
theStack [Mon, 14 Dec 2009 08:12:28 +0000 (09:12 +0100)]
kernel.py: disable timeout (having blocking read)

10 years agoMEGAWOOT: it just works \o/
Bernhard Urban [Mon, 14 Dec 2009 07:21:12 +0000 (08:21 +0100)]
MEGAWOOT: it just works \o/

instructions: first, type make to build the pkernel. ignore the
warnings.
then start frprog.py and ram pkernel into ram:
> ./frprog.py pkernel/pkernel.mhx

when its done, the first led should be on. next command:
> ./pkernel/kernel.py <your target mhx file>

wait and have fun :D

10 years agouse chip erase command instead of deleting each cell. however, this
Bernhard Urban [Mon, 14 Dec 2009 06:19:13 +0000 (07:19 +0100)]
use chip erase command instead of deleting each cell. however, this
won't work atm.
although the code is executed from IRAM there seems to be further access
on the flash... i'll check this out...

10 years agow00t :)
Bernhard Urban [Mon, 14 Dec 2009 05:23:17 +0000 (06:23 +0100)]
w00t :)

the trick: erase first *all* sectors and then flash it, not erase,
flash, erase, flash, ...

10 years agookay, here is a programmer (=kernel.py) which communicate to the pkernel
Bernhard Urban [Mon, 14 Dec 2009 03:25:14 +0000 (04:25 +0100)]
okay, here is a programmer (=kernel.py) which communicate to the pkernel
running on the board. there are some operation done to the flash,
however it isn't correct (nothing happens after a reset)

note: atm you have to program the pkernel with a windows programmer.
note: use simpleprg.mhx to test it. (on larger files it takes *very*
long, due to a built-in debug delay ;))

todo: after pkernel works correctly, we have to reduce the .mhx size.
when the mhx file is small enough we can use the bootrom hack to load it
directly into ram. after that it should be done :)

10 years agoremoved USTACK
Bernhard Urban [Mon, 14 Dec 2009 02:04:17 +0000 (03:04 +0100)]
removed USTACK

10 years agochanged from K to X -- even more DRAM \o/
Bernhard Urban [Mon, 14 Dec 2009 01:59:24 +0000 (02:59 +0100)]
changed from K to X -- even more DRAM \o/

10 years agoremoved "CONST" section
Bernhard Urban [Mon, 14 Dec 2009 01:57:18 +0000 (02:57 +0100)]
removed "CONST" section

however, it is still there in the map... wtf?

10 years agoclockstuff too
Bernhard Urban [Mon, 14 Dec 2009 01:44:38 +0000 (02:44 +0100)]
clockstuff too

10 years agoremoved basically some clockrelated ifdef stuff
Bernhard Urban [Mon, 14 Dec 2009 01:40:44 +0000 (02:40 +0100)]
removed basically some clockrelated ifdef stuff

10 years agoleds "show" 0xaa when finished flashing process
Bernhard Urban [Mon, 14 Dec 2009 01:34:00 +0000 (02:34 +0100)]
leds "show" 0xaa when finished flashing process

10 years agosome cleanup
Bernhard Urban [Mon, 14 Dec 2009 01:33:18 +0000 (02:33 +0100)]
some cleanup

10 years agoremoved some uart strings and functions
Bernhard Urban [Mon, 14 Dec 2009 01:20:45 +0000 (02:20 +0100)]
removed some uart strings and functions

-rw-r--r-- 1 lewurm lewurm 5206 2009-12-14 02:21 pkernel/pkernel.mhx

10 years agorefactoring/reformatting fun...
Bernhard Urban [Mon, 14 Dec 2009 01:12:32 +0000 (02:12 +0100)]
refactoring/reformatting fun...

dude, i think the don't even have a tab key in japan.

10 years agow00t, wtf IT WORKS NOW!!!1
Bernhard Urban [Mon, 14 Dec 2009 00:33:17 +0000 (01:33 +0100)]
w00t, wtf IT WORKS NOW!!!1

BUT actually I have NO idea why!

10 years agowe can write 0x00 at 0xf4000, but nothing else... :(
Bernhard Urban [Sun, 13 Dec 2009 22:30:58 +0000 (23:30 +0100)]
we can write 0x00 at 0xf4000, but nothing else... :(
also added the a pragma section found in flash.c to all c-files... dunno
if it actually changes something.

10 years agonicer output; still don't work as desired :/
Bernhard Urban [Sun, 13 Dec 2009 22:03:35 +0000 (23:03 +0100)]
nicer output; still don't work as desired :/

10 years agothis commit won't work :(
Bernhard Urban [Sun, 13 Dec 2009 21:37:19 +0000 (22:37 +0100)]
this commit won't work :(

basically he tries to flash a programm (here it is simpleprg) to
0xf4000 and erase it before. unfortunately it will fail -- maybe because
the pkernel is executed itself from there?!
however, the readme.txt of the flashdemo says no... dunno :(

10 years agoprep for python kernelprog
Bernhard Urban [Sun, 13 Dec 2009 21:37:13 +0000 (22:37 +0100)]
prep for python kernelprog

10 years agoroot Makefile
Bernhard Urban [Sun, 13 Dec 2009 20:49:51 +0000 (21:49 +0100)]
root Makefile

10 years agomoved pkernel in a own directory
Bernhard Urban [Sun, 13 Dec 2009 20:49:19 +0000 (21:49 +0100)]
moved pkernel in a own directory

10 years agomerged flashdemo repo
Bernhard Urban [Sun, 13 Dec 2009 20:32:44 +0000 (21:32 +0100)]
merged flashdemo repo

Merge branch 'master' of wien.tomnetworks.com:flashdemo
Conflicts:
.gitignore

10 years agoactually we have to write it in IRAM, thus we have to skip addresses for
Bernhard Urban [Sun, 13 Dec 2009 07:28:39 +0000 (08:28 +0100)]
actually we have to write it in IRAM, thus we have to skip addresses for
section >= 0x148000 and also have to calculate a other writeaddress as
given in the mhx file. however, we need those addresses later for the
real flashing part (through pkernel)

10 years agoflashing will be done now in a simple loop
theStack [Sun, 13 Dec 2009 07:08:53 +0000 (08:08 +0100)]
flashing will be done now in a simple loop

10 years agorefactor fun
Bernhard Urban [Sun, 13 Dec 2009 07:06:43 +0000 (08:06 +0100)]
refactor fun

10 years agopkernel programmer init
Bernhard Urban [Sun, 13 Dec 2009 07:03:18 +0000 (08:03 +0100)]
pkernel programmer init

10 years agofirst version of mhx file support impl.
theStack [Sun, 13 Dec 2009 07:01:11 +0000 (08:01 +0100)]
first version of mhx file support impl.

o it can only handle S2 records (which means max. 6 bytes for the addresses) by now,
but other data records shouldn't be used by the fujitsu converter anyway i guess?
o data is only read and printed to stdout, but not really used, that will be done
in the next commit

10 years agookay, big fat note: clear the fucking watchdog timer...... DAMN ;)
Bernhard Urban [Sun, 13 Dec 2009 04:58:33 +0000 (05:58 +0100)]
okay, big fat note: clear the fucking watchdog timer...... DAMN ;)

10 years agoexecute own code from iram, however READ attention text before doing
Bernhard Urban [Sun, 13 Dec 2009 02:19:02 +0000 (03:19 +0100)]
execute own code from iram, however READ attention text before doing
something stupid

also added some (useful?) examples...

10 years agoa call to the end of the IRAM (0x00033ffc)...
theStack [Sat, 12 Dec 2009 04:15:53 +0000 (05:15 +0100)]
a call to the end of the IRAM (0x00033ffc)...

*really* starts the program that was flashed before - how crazy is that? does
that mean that instructions are called backwards or something like that? well,
at the moment i don't care new super mario bros is waiting xD

10 years agoimpl. CALL and CHECKSUM bootloader cmds, untested
theStack [Sat, 12 Dec 2009 04:00:08 +0000 (05:00 +0100)]
impl. CALL and CHECKSUM bootloader cmds, untested

10 years agoadd constants for device and baudrate
theStack [Sat, 12 Dec 2009 03:47:32 +0000 (04:47 +0100)]
add constants for device and baudrate

10 years agoadd a test with some more data and local chksum
theStack [Sat, 12 Dec 2009 03:35:23 +0000 (04:35 +0100)]
add a test with some more data and local chksum

+ decreased sleep time (1ms instead of 10ms just works fine)
+ doubled baud rate (the highest possible by now as it seems?)

10 years agoinitial commit
theStack [Sat, 12 Dec 2009 03:10:12 +0000 (04:10 +0100)]
initial commit

10 years agodecreased speed for led counter and stop it at the end of main
Bernhard Urban [Fri, 11 Dec 2009 23:33:26 +0000 (00:33 +0100)]
decreased speed for led counter and stop it at the end of main

10 years agolowercase plz
Bernhard Urban [Fri, 11 Dec 2009 23:10:01 +0000 (00:10 +0100)]
lowercase plz

10 years agoRevert "headerfile/makefile hax hax"
Bernhard Urban [Fri, 11 Dec 2009 23:08:47 +0000 (00:08 +0100)]
Revert "headerfile/makefile hax hax"

This reverts commit 828d4e7ae7bd728f23424ea58cc1b445a58328ac.

10 years agoheaderfile/makefile hax hax
Bernhard Urban [Fri, 11 Dec 2009 23:06:18 +0000 (00:06 +0100)]
headerfile/makefile hax hax

10 years agoright led port for bits pot blue board
Bernhard Urban [Fri, 11 Dec 2009 23:03:58 +0000 (00:03 +0100)]
right led port for bits pot blue board

10 years agodos2unix on all files + tab madness
theStack [Fri, 11 Dec 2009 22:57:46 +0000 (23:57 +0100)]
dos2unix on all files + tab madness

10 years agogitignore update
Bernhard Urban [Fri, 11 Dec 2009 22:13:51 +0000 (23:13 +0100)]
gitignore update

10 years agoinit
Bernhard Urban [Fri, 11 Dec 2009 21:59:40 +0000 (22:59 +0100)]
init