FreeEMS-Loader

FreeEMS topics that aren't specific to hardware development or firmware development.
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: FreeEMS-Loader

Post by Fred »

Clicked connect, window disappeared, this was in the terminal:

Code: Select all

freeair:Desktop fred$ Qt has caught an exception thrown from an event handler. Throwing
exceptions from an event handler is not supported in Qt. You must
reimplement QApplication::notify() and catch all exceptions there.
Also, the text in the buttons is too big for the buttons on the mac at least.

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
SleepyKeys
LQFP144 - On Top Of The Game
Posts: 549
Joined: Mon Feb 11, 2008 10:52 pm
Location: Arizona
Contact:

Re: FreeEMS-Loader

Post by SleepyKeys »

Just need to add code to my s19 fillRecord method and we should have full rip capability.
You snooze, you lose!
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: FreeEMS-Loader

Post by Fred »

Awesome! :-) I look forward to trying it out. Don't forget the "exclude SM" option, because without that (or a filter on the loader) it cant be loaded again afterwards. I'd say that option is better, then other loaders can also use the output file.

Also, register your intended usage of EssEss' lib here:

viewtopic.php?f=8&t=987

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: FreeEMS-Loader

Post by Fred »

The service you can use for partial loads is partially working. See the last few commits for details. It's more info than you need or dave needs but it'll serve you both well.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
SleepyKeys
LQFP144 - On Top Of The Game
Posts: 549
Joined: Mon Feb 11, 2008 10:52 pm
Location: Arizona
Contact:

Re: FreeEMS-Loader

Post by SleepyKeys »

Seems there may be a bug in the hcs12mem tool, or Freds dump script. I compared the dumps from freeems-loader and hcs12mem( ./dumpAllFlash3forms.bash /dev/ttyUSB0) and found some differences. It looks like the data is ok, but hcs12mem tool is writing the wrong address to the s19 record.

Chapter 17
Memory Mapping Control (S12XMMCV2)
"The fixed 16K page from $4000–$7FFF (when ROMHM = 0) is the page number $FD.
The reset value of $FE ensures that there is linear Flash space available between addresses $4000 and
$FFFF out of reset.
The fixed 16K page from $C000-$FFFF is the page number $FF.
"
http://powerefi.com/files/memtoolbug.jpeg

http://powerefi.com/files/memtool2.jpeg

EDIT (Fred): Changed images to links, too big for little eee :-)
You snooze, you lose!
User avatar
SleepyKeys
LQFP144 - On Top Of The Game
Posts: 549
Joined: Mon Feb 11, 2008 10:52 pm
Location: Arizona
Contact:

Re: FreeEMS-Loader

Post by SleepyKeys »

Changed to using the PPAGE window to pull all memory.
You snooze, you lose!
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: FreeEMS-Loader

Post by Fred »

Feedback time! :-)

1) File names are in bad taste. Is this dictated by qt? I'd de-prefix them all except the one that is effectively main.c and give them less abbreviated names. JHarvey would call this shed colour, however naming, in all forms, is extremely important IMO.
2) Hitting connect with the serial device not existing causes a crash:

Code: Select all

freeair:src fred$ ./FreeEMS_Loader.app/Contents/MacOS/FreeEMS_Loader
Qt has caught an exception thrown from an event handler. Throwing
exceptions from an event handler is not supported in Qt. You must
reimplement QApplication::notify() and catch all exceptions there.

Abort trap
3) When trying to use this device on the mac /dev/tty.usbserial-A1003NmB I get the following garbage when hitting connect and the rip/load buttons remain greyed and the connect remains active:

Code: Select all

CLI output redirected
Error: 
Error while reading: Undefined error: 0

Àá¿_ÿ
set flash type to
S12XDP512
Same thing with the /dev/cu.usbserial-A1003NmB device which dave claims is better, and each time i hit connect i get this in the text area:

Code: Select all

 about to write char(s) -> d
 to com port 
which is clearly debug, but my god man, wtf is a com port???? :-p :-/ serial port! com is very win... vomits...

So, in summary, I can't use the app on the mac. I didn't try on the eee yet. I may soon.

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
SleepyKeys
LQFP144 - On Top Of The Game
Posts: 549
Joined: Mon Feb 11, 2008 10:52 pm
Location: Arizona
Contact:

Re: FreeEMS-Loader

Post by SleepyKeys »

working on it now, just wanted to get the eraseDevice function done real quick.
You snooze, you lose!
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: FreeEMS-Loader

Post by Fred »

Awesome :-)
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: FreeEMS-Loader

Post by Fred »

Code: Select all

Error validating SMErasePage
erased page
ðÿÿÿ
writing to ppage register
ñÿÿÿ
writing to ppage register
ñÿÿÿ
Error validating SMErasePage
erased page
ñÿÿÿ
writing to ppage register
òÿÿÿ

Code: Select all

S214E089D0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC2
record built
S214E089E0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFB2
record built
S214E089F0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA2
record built

Code: Select all

S214FFBFB0FE4DFE4FFE51FE53FE55FE57FE59FE5BED
record built
S214FFBFC0FE5DFE5FFE61FE63FE65FE67FE69FE6B5D
record built

Code: Select all

QClipboard: Timed out while sending data
Too much stuff to paste, gotta calm down the debug once you are confident in it.

In the chooser you get:

"xyz file already exists are you sure you want to replace it?"

This comes up quite happily if you choose the same file and click OK, but if you click cancel, your code over writes the file blindly and doesn't ask the same question. IE, your code pays no attention to the output of the chooser dialog! :-/ If you say no when that does pop up, it just goes back to what it was doing.

I'm now ripping the same image again to replace the one that just got blown away...

You also open the file, write nothing to it, and leave it empty till the end, then dump the data down. It'd be nice to write to it line by line and see the progress, or was I wrong, maybe it was pulling blank data and not writing it because it was blank data. I think I just ripped a pure serial monitor? Indeed I did! Useful, but you should exclude that from the rip, it is by definition not something you want to rip because you need to talk to it to do the rip... ;-)

Full erase is confirmed and full rip is also confirmed. Despite above messages.

What are all those weird characters, same on the mac and eee/sid/deb.

Right, time to hack the firmware to be fast-to-start again.

Hmmm, are those errors you trying to erase the SM? Maybe you need a global define of what you can't rip/erase from a certain device type.

Also, get rid of that device type selector in grey from the UI :-p
What does the Debug button do? Do you need it? If not...
Go button? I don't even understand that one?

Can we add an erase button next to load/rip, and a check box for erase first? That way if it's already erased we dont have to wait or add extra cycles to the flash.

You've gotta get this thing threaded so that it can show a progress indicator, you know up front how much of the device you need to rip/erase and how much you have done, so you can give an accuratge one, ditto on send. The whole gui just goes grey when you are doing anythign on the port, like it's crashed, bad for users.

The RX/TX lights/radio buttons are probably pointless, or do you want to light them in parallel with the actual hardware sends/receives?

OK, food, then firmware hacking, yay, this was supposed to be for you to do, but you've got your hands full on the loader, and the tools when the loader is mint, so I'll do this xgate init stuff now.

It's important to get the thing working on the mac now, as it's no longer possible to load the firmware to the device with a mac if your app can't erase on there.

Nothing like a bit of pressure to make things happen. As of tonight, once I've made the change, the loader is an integral and important tool that I'll be using every day. I will whinge :-)

Well done on getting it this far.

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
Post Reply