HCS12 Loader/Debugger Linux

Started by "Jim...@googlemail.com [68HC12]" November 5, 2015
HELP!!!

I have searched high and low, and to the darkest recesses of the internet
and cannot for the life of me find a linux based loader for HCS12.

I have been creating a linux based system to create, convert and load an
assembly file into a HCS12 board, but I've come up with nothing for the
loading part.

I'm trying to load it through a BDM (P&E Multilink to be specific).

If anyone has any ideas about this please let me know.

Thanks
Jim
I am using the GCC toolchain, compile under SuSE linux 13.2, and load
into flash using a Technological Arts uBdm12. I have a P & E USB
MUltillink too but I have not been able to get that running under linux.

I usually access the uBDM12 using minicom, but when I want to do serious
step-by-step debugging I have a copy of NoICE that works under linux.
The Tech Arts uBDM12 uses debug12 so has a simple ASCII serial command
format to the PC.

If you want to run NoICE, let me know, I have some notes at home that
will help you.

Happy Coding!

--
Nigel Johnson
MSc., MIEEE
VE3ID/G4AJQ/VA3MCU

Amateur Radio, the origin of the open-source concept!

http://nigel.homelinux.net
http://va3mcu.ham-radio-op.net

You can reach me by voice on Skype: TILBURY2591

If time travel ever will be possible, it already is. Ask me again yesterday

This e-mail is not and cannot, by its nature, be confidential. En route from me to you, it will pass across the public Internet, easily readable by any number of system administrators along the way.
Nigel Johnson

Please consider the environment when deciding if you really need to print this message

On 11/05/2015 06:30 AM, Jim Alcock j...@googlemail.com [68HC12] wrote:
>
> HELP!!!
>
> I have searched high and low, and to the darkest recesses of the
> internet and cannot for the life of me find a linux based loader for
> HCS12.
>
> I have been creating a linux based system to create, convert and load
> an assembly file into a HCS12 board, but I've come up with nothing for
> the loading part.
>
> I'm trying to load it through a BDM (P&E Multilink to be specific).
>
> If anyone has any ideas about this please let me know.
>
> Thanks
> Jim
>
I was looking at using NoICE but they don't seem to have any linux
distrubutions on their website, where did you get a linux version?

KInd Regards
Jim

On 5 November 2015 at 11:50, Nigel Johnson n...@ieee.org [68HC12] <
6...> wrote:

> I am using the GCC toolchain, compile under SuSE linux 13.2, and load into
> flash using a Technological Arts uBdm12. I have a P & E USB MUltillink too
> but I have not been able to get that running under linux.
>
> I usually access the uBDM12 using minicom, but when I want to do serious
> step-by-step debugging I have a copy of NoICE that works under linux. The
> Tech Arts uBDM12 uses debug12 so has a simple ASCII serial command format
> to the PC.
>
> If you want to run NoICE, let me know, I have some notes at home that will
> help you.
>
> Happy Coding!
>
> --
> Nigel Johnson
> MSc., MIEEE
> VE3ID/G4AJQ/VA3MCU
>
> Amateur Radio, the origin of the open-source concept!
> http://va3mcu.ham-radio-op.net" target="_blank" rel="nofollow">http://nigel.homelinux.nethttp://va3mcu.ham-radio-op.net
>
> You can reach me by voice on Skype: TILBURY2591
>
> If time travel ever will be possible, it already is. Ask me again yesterday
>
> This e-mail is not and cannot, by its nature, be confidential. En route from me to you, it will pass across the public Internet, easily readable by any number of system administrators along the way.
> Nigel Johnson
> Please consider the environment when deciding if you really need to print this message
> On 11/05/2015 06:30 AM, Jim Alcock j...@googlemail.com [68HC12]
> wrote:
> HELP!!!
>
> I have searched high and low, and to the darkest recesses of the internet
> and cannot for the life of me find a linux based loader for HCS12.
>
> I have been creating a linux based system to create, convert and load an
> assembly file into a HCS12 board, but I've come up with nothing for the
> loading part.
>
> I'm trying to load it through a BDM (P&E Multilink to be specific).
>
> If anyone has any ideas about this please let me know.
>
> Thanks
> Jim
I used the windows one and ran it under wine + mono

Nigel

--
Nigel Johnson
MSc., MIEEE
VE3ID/G4AJQ/VA3MCU

Amateur Radio, the origin of the open-source concept!

http://nigel.homelinux.net
http://va3mcu.ham-radio-op.net

You can reach me by voice on Skype: TILBURY2591

If time travel ever will be possible, it already is. Ask me again yesterday

This e-mail is not and cannot, by its nature, be confidential. En route from me to you, it will pass across the public Internet, easily readable by any number of system administrators along the way.
Nigel Johnson

Please consider the environment when deciding if you really need to print this message

On 11/05/2015 06:56 AM, Jim Alcock j...@googlemail.com [68HC12] wrote:
>
> I was looking at using NoICE but they don't seem to have any linux
> distrubutions on their website, where did you get a linux version?
>
> KInd Regards
> Jim
>
> On 5 November 2015 at 11:50, Nigel Johnson n...@ieee.org
> [68HC12] <6...
>




&














































&E





Ahhh I see, I'm trying to avoid using windows unless necessary.

The whole story (which I apologize for nothing giving you sooner, mostly
because I didnt realize myself) is I'm trying to write a bootloader to the
EEPROM using a BDM, so that other people can write a program to the
bootloader, but I only have linux to use.

Without trying to be cheeky I was wondering if you could possibly advise me
what the best course of action to take.

I'm not very experienced with embedded software and even less so with the
HCS12 chipset.

Thanks for you help so far.

Jim

On 5 November 2015 at 13:27, Nigel Johnson n...@ieee.org [68HC12] <
6...> wrote:

> I used the windows one and ran it under wine + mono
>
> Nigel
>
> --
> Nigel Johnson
> MSc., MIEEE
> VE3ID/G4AJQ/VA3MCU
>
> Amateur Radio, the origin of the open-source concept!
> http://va3mcu.ham-radio-op.net" target="_blank" rel="nofollow">http://nigel.homelinux.nethttp://va3mcu.ham-radio-op.net
>
> You can reach me by voice on Skype: TILBURY2591
>
> If time travel ever will be possible, it already is. Ask me again yesterday
>
> This e-mail is not and cannot, by its nature, be confidential. En route from me to you, it will pass across the public Internet, easily readable by any number of system administrators along the way.
> Nigel Johnson
> Please consider the environment when deciding if you really need to print this message
> On 11/05/2015 06:56 AM, Jim Alcock j...@googlemail.com [68HC12]
> wrote:
> I was looking at using NoICE but they don't seem to have any linux
> distrubutions on their website, where did you get a linux version?
>
> KInd Regards
> Jim
>
> On 5 November 2015 at 11:50, Nigel Johnson n...@ieee.org [68HC12] <
> 6...> wrote:
>
>> I am using the GCC toolchain, compile under SuSE linux 13.2, and load
>> into flash using a Technological Arts uBdm12. I have a P & E USB
>> MUltillink too but I have not been able to get that running under linux.
>>
>> I usually access the uBDM12 using minicom, but when I want to do serious
>> step-by-step debugging I have a copy of NoICE that works under linux. The
>> Tech Arts uBDM12 uses debug12 so has a simple ASCII serial command format
>> to the PC.
>>
>> If you want to run NoICE, let me know, I have some notes at home that
>> will help you.
>>
>> Happy Coding!
>>
>> --
>> Nigel Johnson
>> MSc., MIEEE
>> VE3ID/G4AJQ/VA3MCU
>>
>> Amateur Radio, the origin of the open-source concept!
>> http://va3mcu.ham-radio-op.net" target="_blank" rel="nofollow">http://nigel.homelinux.nethttp://va3mcu.ham-radio-op.net
>>
>> You can reach me by voice on Skype: TILBURY2591
>>
>> If time travel ever will be possible, it already is. Ask me again yesterday
>>
>> This e-mail is not and cannot, by its nature, be confidential. En route from me to you, it will pass across the public Internet, easily readable by any number of system administrators along the way.
>> Nigel Johnson
>> Please consider the environment when deciding if you really need to print this message
>> On 11/05/2015 06:30 AM, Jim Alcock
>> j...@googlemail.com [68HC12] wrote:
>> HELP!!!
>>
>> I have searched high and low, and to the darkest recesses of the internet
>> and cannot for the life of me find a linux based loader for HCS12.
>>
>> I have been creating a linux based system to create, convert and load an
>> assembly file into a HCS12 board, but I've come up with nothing for the
>> loading part.
>>
>> I'm trying to load it through a BDM (P&E Multilink to be specific).
>>
>> If anyone has any ideas about this please let me know.
>>
>> Thanks
>> Jim
>
Well, you are not really using windows if you run a windows app under wine !

I have no experience in writing bootloaders, so I cannot help you
there. I believe Motorola, then Freescale had an app note on it though.
You could check their web site.

However, I am told the HCS12 is not recommend for new designs. My local
Freescale FAE says it will be around for ten years, but their main sales
go to the big automakers and the wind could change very rapidly.

that's just my two ha'penneth worth :-)

Nigel

--
Nigel Johnson
MSc., MIEEE
VE3ID/G4AJQ/VA3MCU

Amateur Radio, the origin of the open-source concept!

http://nigel.homelinux.net
http://va3mcu.ham-radio-op.net

You can reach me by voice on Skype: TILBURY2591

If time travel ever will be possible, it already is. Ask me again yesterday

This e-mail is not and cannot, by its nature, be confidential. En route from me to you, it will pass across the public Internet, easily readable by any number of system administrators along the way.
Nigel Johnson

Please consider the environment when deciding if you really need to print this message

On 11/05/2015 08:49 AM, Jim Alcock j...@googlemail.com [68HC12] wrote:
>
> Ahhh I see, I'm trying to avoid using windows unless necessary.
>
> The whole story (which I apologize for nothing giving you sooner,
> mostly because I didnt realize myself) is I'm trying to write a
> bootloader to the EEPROM using a BDM, so that other people can write a
> program to the bootloader, but I only have linux to use.
>
> Without trying to be cheeky I was wondering if you could possibly
> advise me what the best course of action to take.
>
> I'm not very experienced with embedded software and even less so with
> the HCS12 chipset.
>
> Thanks for you help so far.
>
> Jim
>
> On 5 November 2015 at 13:27, Nigel Johnson n...@ieee.org
> [68HC12] <6...
>






































<






&















































&E







I started with the TechArts NoICE but eventually had to go to the P&E and programmed/debugged using CodeWarrier. Was good for the longest time with the 32K free C compiler but eventually went up over and now I’m closing in on 64K. Partly because I’ve also added code download.

However, it’s for a client who paid to have it done so I can’t release it but perhaps I can give you some ideas.

The module
http://www.autoartisans.com/rings/Assembled9S12-1.JPG
has 5 CAN ports, RS485, USB (FTDI-245), 6 relay drivers and 6 dry contact to ground connections. I now have an add on board that has battery backed up real time clock, MicroSD card and Ethernet module. The 5 CAN channels were original allocated to one per ring.
http://www.autoartisans.com/rings/Barge1a.jpg

Now instead it’s CANOpen and J1939 and another custom CAN bus. Communication with the host PC is through the USB port. There’s firmware that puts the system into CANUSB mode simulating a bare bones fixed bit rate CANUSB from Lawicel.com. That’s so the ds30Loader software can be run to program dsPIC devices on the CANOpen bus without removing hardware.

Upgrades to the 9S12 are done in a similar way. There is a small loader written into protected memory. If two of the CAN bus channels are connected together and see a particular on/off sequence that can’t be CAN messages it enters the bootloader instead of using a vector in FLASH to the application.

Once inside it copies a number of routines into RAM and then waits for the .phy file created by the LogToPhy program from P&E. The loader earases FLASH on receipt of an ‘F’ command. Then the download part just waits for ‘P’ command and S records and writes them to FLASH. On receipt of each read it echo’s a ‘*’. So there’s handshaking on a line by line basis. When the last record is reached the host software sends an S9 along with a file checksum and if it all matches the bootloader writes the start address into 0xC000. The final act it also to read/write protect the FLASH. There is a special back door key that is known to the bootloader and application that can unlock this for erasing and reprogramming.

On power up if there is a valid address at 0xC000 the bootloader goes there right away. If it’s a bad address the CAN bus jumper cable can take it back into the loader. Once programmed the loader has a Run command to also branch to that address.

I used information from AN2546, AN2375 and AN4258 as a guide. I can’t release it because my downloader application and the bootloader also use encryption/decryption to prevent reverse engineering of the code.

John

From: 6... [mailto:6...]
Sent: November-05-15 5:49 AM
To: 6...
Subject: Re: [68HC12] HCS12 Loader/Debugger Linux


Ahhh I see, I'm trying to avoid using windows unless necessary.
The whole story (which I apologize for nothing giving you sooner, mostly because I didnt realize myself) is I'm trying to write a bootloader to the EEPROM using a BDM, so that other people can write a program to the bootloader, but I only have linux to use.
Without trying to be cheeky I was wondering if you could possibly advise me what the best course of action to take.
I'm not very experienced with embedded software and even less so with the HCS12 chipset.
Thanks for you help so far.
Jim

On 5 November 2015 at 13:27, Nigel Johnson n...@ieee.org [68HC12] <68H...> wrote:

I used the windows one and ran it under wine + mono

Nigel


--
Nigel Johnson
MSc., MIEEE
VE3ID/G4AJQ/VA3MCU

Amateur Radio, the origin of the open-source concept!

http://nigel.homelinux.net
http://va3mcu.ham-radio-op.net

You can reach me by voice on Skype: TILBURY2591

If time travel ever will be possible, it already is. Ask me again yesterday

This e-mail is not and cannot, by its nature, be confidential. En route from me to you, it will pass across the public Internet, easily readable by any number of system administrators along the way.
Nigel Johnson


Please consider the environment when deciding if you really need to print this message



On 11/05/2015 06:56 AM, Jim Alcock j...@googlemail.com [68HC12] wrote:

I was looking at using NoICE but they don't seem to have any linux distrubutions on their website, where did you get a linux version?
KInd Regards
Jim

On 5 November 2015 at 11:50, Nigel Johnson n...@ieee.org [68HC12] <68H...> wrote:

I am using the GCC toolchain, compile under SuSE linux 13.2, and load into flash using a Technological Arts uBdm12. I have a P & E USB MUltillink too but I have not been able to get that running under linux.

I usually access the uBDM12 using minicom, but when I want to do serious step-by-step debugging I have a copy of NoICE that works under linux. The Tech Arts uBDM12 uses debug12 so has a simple ASCII serial command format to the PC.

If you want to run NoICE, let me know, I have some notes at home that will help you.

Happy Coding!


--
Nigel Johnson
MSc., MIEEE
VE3ID/G4AJQ/VA3MCU

Amateur Radio, the origin of the open-source concept!

http://nigel.homelinux.net
http://va3mcu.ham-radio-op.net

You can reach me by voice on Skype: TILBURY2591

If time travel ever will be possible, it already is. Ask me again yesterday

This e-mail is not and cannot, by its nature, be confidential. En route from me to you, it will pass across the public Internet, easily readable by any number of system administrators along the way.
Nigel Johnson


Please consider the environment when deciding if you really need to print this message



On 11/05/2015 06:30 AM, Jim Alcock j...@googlemail.com [68HC12] wrote:

HELP!!!
I have searched high and low, and to the darkest recesses of the internet and cannot for the life of me find a linux based loader for HCS12.
I have been creating a linux based system to create, convert and load an assembly file into a HCS12 board, but I've come up with nothing for the loading part.
I'm trying to load it through a BDM (P&E Multilink to be specific).

If anyone has any ideas about this please let me know.
Thanks
Jim





[Non-text portions of this message have been removed]


Posted by: "John Dammeyer"



NoICE (under Windows) used P&E's unit12 DLL to interface with the
Multilink. The pod protocol isn't documented that I know of, and P&E
charges for the DLL documentation and distribution rights.

I see that P&E does offer a Linux driver for the Multilink
(https://www.pemicro.com/support/download_processor.cfm?type=3), but it
isn't clear what the interface is.

Nigel's uBdm12 is a serial interface, which would definitely be easier
to deal with, either natively or via NoICE/Wine
On 11/5/2015 5:50 AM, Nigel Johnson n...@ieee.org [68HC12] wrote:
>
> I am using the GCC toolchain, compile under SuSE linux 13.2, and load
> into flash using a Technological Arts uBdm12. I have a P & E USB
> MUltillink too but I have not been able to get that running under linux.
>
> I usually access the uBDM12 using minicom, but when I want to do
> serious step-by-step debugging I have a copy of NoICE that works under
> linux. The Tech Arts uBDM12 uses debug12 so has a simple ASCII serial
> command format to the PC.
>
> If you want to run NoICE, let me know, I have some notes at home that
> will help you.
>
> Happy Coding!
>
>
>
> --
> Nigel Johnson
> MSc., MIEEE
> VE3ID/G4AJQ/VA3MCU
>
> Amateur Radio, the origin of the open-source concept!
>
> http://nigel.homelinux.net
> http://va3mcu.ham-radio-op.net
>
> You can reach me by voice on Skype: TILBURY2591
>
> If time travel ever will be possible, it already is. Ask me again yesterday
>
> This e-mail is not and cannot, by its nature, be confidential. En route from me to you, it will pass across the public Internet, easily readable by any number of system administrators along the way.
> Nigel Johnson
> Please consider the environment when deciding if you really need to print this message
>
> On 11/05/2015 06:30 AM, Jim Alcock j...@googlemail.com [68HC12]
> wrote:
>> HELP!!!
>>
>> I have searched high and low, and to the darkest recesses of the
>> internet and cannot for the life of me find a linux based loader for
>> HCS12.
>>
>> I have been creating a linux based system to create, convert and load
>> an assembly file into a HCS12 board, but I've come up with nothing
>> for the loading part.
>>
>> I'm trying to load it through a BDM (P&E Multilink to be specific).
>>
>> If anyone has any ideas about this please let me know.
>>
>> Thanks
>> Jim
Hi,
I used to work with miniIDE for compilation and download purposes with 32 bit computers.
I have Adapt 9s12dp256 board and it was quite convenient.
The problem is that miniIDE does not work with 64 bit computers.
Does someone have an idea about an alternative software?
Thanks,
Eli
I’m using Freescale Codewarrier 5.9 IDE on WIN-7 64 bit programming the 9S12xdp512. Free for up to 32K code space. Depending on the purchase/service module you can also get 64K or full versions.
Coupled with the P&E programmer debugger it’s a very usable infrastructure. It may not work on anything past WIN-7.
John



From: 6... [mailto:6...]
Sent: November-05-15 10:44 PM
To: 6...
Subject: [68HC12] IDE for 64 bit computers


Hi,
I used to work with miniIDE for compilation and download purposes with 32 bit computers.
I have Adapt 9s12dp256 board and it was quite convenient.
The problem is that miniIDE does not work with 64 bit computers.
Does someone have an idea about an alternative software?
Thanks,
Eli

[Non-text portions of this message have been removed]


Posted by: "John Dammeyer"