DIYEFI.org Forum
http://forum.diyefi.org/

Fred's firmware development diary
http://forum.diyefi.org/viewtopic.php?f=8&t=57
Page 1 of 99

Author:  Fred [ Sun Feb 17, 2008 1:31 am ]
Post subject:  Fred's firmware development diary

Hi,

Comments here: viewtopic.php?f=8&t=58&view=unread#unread

Before attempting to use any of the software found in this thread, please read our disclaimer here : http://www.diyefi.org/disclaimer.htm

Because I'm not stupid the first thing I did was extract the s19 that was on the board and working. I've saved that, and it's bigger than the ones that I downloaded that are supposed to be the same.

I verified that erase works by erasing, reseting and getting no response from it at all.

I reloaded the dump I took from it, reset, and verified that that still worked the same.

However, Something is funny about the way GCC+my memory.x+my makefile are compiling the code. I loaded my code on, but to have that happen without errors I had to disable eeprom (ok, fine) and ram (wtf??) So I have some playing around to do before my code will load and work. Of course, loading it without ram enabled is probably going to mean its a rather expensive 512K flash disk :-)

I might play for a while longer and see what I can suss out.

Fred.

Author:  Fred [ Sun Feb 17, 2008 2:22 am ]
Post subject:  Re: Fred's firmware development diary

OK, so I've confirmed why the error was occurring on load of my dumped s19 file. The dump (as I suspected) contained the Serial Monitor. Manually removing that from the dump caused the load error to cease occurring. The error did no harm because it had already written everything to flash before it occurred (block by block). attached are three files.

The first one is a raw dump (works, but gives error on load)
The second one is without the SM or vector table (doesn't work)
The third one is without the SM only (works with no error)

Now, on to finding out why my code won't load correctly.

Admin.

PS, apparently S19 files aren't allowed to be uploaded. My initial reaction was "why the hell not" but it's good because it forces you to zip things which is good practice anyway.

Attachments:
File comment: no serial monitor (works cleanly)
dump.no.sm.zip [2.82 KiB]
Downloaded 515 times
File comment: no vector table or serial monitor
dump.no.vec.or.sm.zip [2.73 KiB]
Downloaded 485 times
File comment: RAW
dump.raw.zip [5.03 KiB]
Downloaded 482 times

Author:  Fred [ Sun Feb 17, 2008 12:12 pm ]
Post subject:  Re: Fred's firmware development diary

OK, I thought I had found a clean way to configure the vector table address, however it does not work. Hopefully when I reconfigure it, it will stop trying to put them in RAM... and the code will work :-) fingers crossed.

Admin.

Author:  Fred [ Sun Feb 17, 2008 12:43 pm ]
Post subject:  Re: Fred's firmware development diary

Well, that's sorted out, however the LED never comes on, so I've got some work to do on the code. I've been ordered out for what the English call coffee (poor excuse for one really). Should make some progress by tonight.

Admin.

Author:  Fred [ Sun Feb 17, 2008 6:09 pm ]
Post subject:  Re: Fred's firmware development diary

Thanks to Alex Babkin for giving me some basic code to test against. It turns out that my problem was attempting to use ISR routines when there was no interrupt. I guess that the return sequence is different to a normal function and it messes something up...

I'm working on tidying the code up now that it functions and documenting what I have. I have some hardware to build and play with, then I can take a video of it working, post that up and cross one "mile stone" off that list!

Admin.

Author:  Fred [ Sun Feb 17, 2008 8:45 pm ]
Post subject:  Re: Fred's firmware development diary

Everything is tidied up and ready to go as far as I can tell. I've zipped up the project and s19 and I'm ready to post them as soon as I have a visual confirmation that they work as anticipated. I now have to cook dinner :-) But after that, I'm getting stuck into building some circuits to display output and capture input safely. There should be some basic code and runnable and video posted in this thread tonight.

Admin.

Author:  Fred [ Mon Feb 18, 2008 1:06 am ]
Post subject:  Re: Fred's firmware development diary

Well, it's just gone midnight, and I'm about to start work on the strip boards. There was a slight delay, read all about it here

Admin.

Author:  Fred [ Mon Feb 18, 2008 4:12 am ]
Post subject:  FreeEMS v0.0.1 released.

Matchbox20 did a song about this time of day once "It's 3am and I must be lonely" I think it went.

http://www.youtube.com/watch?v=NwRQ9wBHDyU

Attached is the s19 and the full source directory.

Don't judge me on this code, its a set of bare essentials for making those leds strobe in series at about 80rpm equivalent.

One strange thing that I noticed is that if I initialised the ports to 0 in the main method it behaved very differently than if I initialised it in the init.c file. If anyone knows why the behaviour is like that, please let me know asap. Seems very strange.

Admin.

Attachments:
File comment: s19 to make the 6 fuel channels light up in sequence.
freeems-v0.0.1.s19.zip [949 Bytes]
Downloaded 522 times

Author:  Fred [ Mon Feb 18, 2008 5:08 pm ]
Post subject:  Re: Fred's firmware development diary

Additionally, I have started using sourceforge a little. I will continue to post the releases here too (till they get too big), however to save bandwidth, it would be better to grab them from sourceforge instead :

https://sourceforge.net/project/showfil ... _id=577573

Admin.

Author:  Fred [ Tue Feb 19, 2008 12:45 pm ]
Post subject:  Re: Fred's firmware development diary

The ADC inputs were extremely easy to access. I only had to set 4 bits in the control registers to make them scan and scan all ports and right justify the results and It worked.

http://www.youtube.com/watch?v=YIKgYhDMe58

Files are available here :

http://sourceforge.net/project/showfile ... _id=577736

and also attached.

Admin.

Attachments:
File comment: FreeEMS s19 zip v0.0.2
freeems-v0.0.2.s19.zip [981 Bytes]
Downloaded 481 times

Page 1 of 99 All times are UTC [ DST ]
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/