View unanswered posts | View active topics It is currently Tue Sep 18, 2018 11:08 pm



Reply to topic  [ 82 posts ]  Go to page Previous  1 ... 5, 6, 7, 8, 9  Next
MC9S12XDP512 board 
Author Message
QFP80 - Contributor
User avatar

Joined: Tue Jul 06, 2010 1:03 pm
Posts: 45
Location: Espoo, Finland
I'll just hijack this thread to ask about the serial monitor ;)

I'm starting my microsquirt module -> freeems conversion and ordered the same board mentioned in the beginning of this thread:
http://elmicro.com/en/cards12.html

Fred:
You mentioned that one needs to hack the firmware to support the 4k SM. Are you referring to the TwinPEEKs SM mentioned on the elmicro page?
It seems that the S12X version is a blank MCU and will need the BDM to install a new SM anyway:

From elmicro page:
"TwinPEEKs is installed on every CardS12 at the time of delivery (*)"
"(*) Note: currently, there is no software included with the S12X module version!"

I also ordered this BDM to work with the MCU:
http://www.flashgenie.net/USBDM.php

So, where do I get the latest version of the freeems SM? And, do I need to compile it or is there a ready made S19? I have the freeems toolchain rocking and the firmware compiles nicely so no problems there...

The USBDM page mentions something about "standalone programmers"? Is anyone using these to program the bootloader (SM) part? Or is the free "Special Edition: CodeWarrior for HCS12(X) Microcontrollers (Classic)" the safest/easiest tool to use for this task? I'm trying to avoid all the codewarrior stuff and try to survive with opensource on linux...

I browsed through the release and in the bin directory I find HCS12_FlashProgrammer. I tried to start the HCS12_Flashprogrammer from the bin directory without installing, but it needs the usbdm library:

Code:
$ ./HCS12_FlashProgrammer
./HCS12_FlashProgrammer: error while loading shared libraries: libusbdm.so: cannot open shared object file: No such file or directory

$ ldd ./HCS12_FlashProgrammer
libusbdm.so => not found
libusbdm-tcl.so => not found
libusbdm-dsc.so => not found


The install script needs the codewarrior (damn), so I made a striped down version of the install script to make this work without the cw stuff. It just copies the library files to ld path, makes symlinks, ldconfigs, adds usb rules file, copies devicedata and flashimages to /usr/local/share/usbdm. Now it starts ok , but I don't have the USB device yet, so time will tell if the install was successful...

The install script:
Code:
#!/bin/bash

echo "Starting"

#====================================================
# Added properties directory
# Updated for Eclipse plugin
# Moved shared files to /usr/local/share/usbdm
#====================================================

#================================
# USBDM Version
#
MAJOR=4
MINOR=10

LIB_SUFFIX=.so.${MAJOR}.${MINOR}

#CP_OPTIONS="-v"
CP_OPTIONS=

USBDM_CONFIG_DIRECTORY=/usr/local/share/usbdm
USBDM_PROP_DIRECTORY=$HOME/.usbdm

PROMPT_L1="This script will install the USBDM V${MAJOR}.${MINOR} files."
PROMPT_L2="Please check the contents of this file before execution.  "
PROMPT_L3="This script needs to be run as root."
PROMPT_L4="use \'sudo ./Install_USBDM_Standalone\'"
PROMPT_L5="Continue (Y/N)?"

echo
echo
echo "########################################################"
echo
echo "${PROMPT_L1}"
echo
echo "${PROMPT_L2}"
echo
echo "${PROMPT_L3}"
echo "${PROMPT_L4}"
echo
echo "${PROMPT_L5}"
echo "${PROMPT_L6}"
echo
echo "########################################################"
echo
echo "${PROMPT_L7}"

read guess
if [ "$guess" != "Y" ]; then
    echo "Ok I won't do anything - bye"
    exit
fi

if [ -z "$SUDO_UID" ]; then
   echo "This script should be run sudo"
   exit 1
fi

if [ -z "$SUDO_GID" ]; then
   echo "This script should be run sudo"
   exit 1
fi

#echo SUDO_UID="$SUDO_UID" SUDO_GID="$SUDO_GID"

echo
echo "Copying rules file to /etc/udev/rules.d"
echo ==================================================================
cp $CP_OPTIONS bin/usbdm.rules /etc/udev/rules.d/usbdm.rules
chmod a+r      /etc/udev/rules.d/usbdm.rules

echo
echo "Installing USBDM shared libraries to /usr/local/lib"
echo ==================================================================
# Earlier install?
rm /usr/local/lib/libusbdm*

# Where to copy shared libs
DEST_LIBDIR=/usr/lib

rm ${DEST_LIBDIR}/libusbdm*

# Shared libs to copy
SHARED_LIBS="libusbdm-wx libusbdm libusbdm-debug libusbdm-dsc libusbdm-dsc-debug libusbdm-tcl libusbdm-tcl-debug"

# Copy & create symbolic links
for FILE in ${SHARED_LIBS}; do
   echo cp $CP_OPTIONS bin/${FILE}.so.${MAJOR}.${MINOR}    ${DEST_LIBDIR}
        cp $CP_OPTIONS bin/${FILE}.so.${MAJOR}.${MINOR}    ${DEST_LIBDIR}
   if [[ ! -e ${DEST_LIBDIR}/${FILE}.so.${MAJOR} ]]; then
      ln -s ${FILE}.so.${MAJOR}.${MINOR}    ${DEST_LIBDIR}/${FILE}.so.${MAJOR}
   fi
   if [[ ! -e ${DEST_LIBDIR}/${FILE}.so ]]; then
      ln -s ${FILE}.so.${MAJOR}.${MINOR}    ${DEST_LIBDIR}/${FILE}.so
   fi
done

#ldconfig -v -n /usr/local/lib
ldconfig -X -v | grep usbdm

echo
echo "Installing USBDM Config files to ${USBDM_CONFIG_DIRECTORY}"
echo ==================================================================
echo
if [[ -e "${USBDM_CONFIG_DIRECTORY}" ]]; then
   echo Cleaning USBDM Config Directory - ${USBDM_CONFIG_DIRECTORY}
   rm -r -f "${USBDM_CONFIG_DIRECTORY}"/*
fi
if [[ ! -e "${USBDM_CONFIG_DIRECTORY}" ]]; then
   echo Creating USBDM Config Directory - ${USBDM_CONFIG_DIRECTORY}
   mkdir "${USBDM_CONFIG_DIRECTORY}"     
else   
   echo USBDM Properties Config already exists - ${USBDM_CONFIG_DIRECTORY}
fi

echo "Copying Device Flash Images"
echo =====================================================================
cp    -r  bin/DeviceData              "${USBDM_CONFIG_DIRECTORY}"

echo "Copying Device Flash Images"
echo =====================================================================
cp    -r  bin/FlashImages             "${USBDM_CONFIG_DIRECTORY}"
chown -R "$SUDO_UID":"$SUDO_GID"      "${USBDM_CONFIG_DIRECTORY}"
chmod -R a+r                          "${USBDM_CONFIG_DIRECTORY}"

echo
echo "Done"


Sun Dec 02, 2012 12:33 pm
Profile
Moderator
User avatar

Joined: Tue Jan 15, 2008 2:31 pm
Posts: 15181
Location: Home sweet home!
MrOnion wrote:
I'm starting my microsquirt module -> freeems conversion

Congratulations! ;-)

Quote:
You mentioned that one needs to hack the firmware to support the 4k SM. Are you referring to the TwinPEEKs SM mentioned on the elmicro page?

Yes, I was.

Quote:
It seems that the S12X version is a blank MCU and will need the BDM to install a new SM anyway:

From elmicro page:
"TwinPEEKs is installed on every CardS12 at the time of delivery (*)"
"(*) Note: currently, there is no software included with the S12X module version!"

Woops, I didn't spot that! Harry will be interested to hear about this! He had some issues, this could explain it! :-(

Quote:
So, where do I get the latest version of the freeems SM?

One that will work is included in the firmware lib dir, but don't use it. Instead go here, for now: viewtopic.php?p=28948#p28948

Quote:
And, do I need to compile it or is there a ready made S19?

The latter. I won't be supporting people with non-standard serial monitors in future. The majority won't be loading their own anyway, so no biggy.

Quote:
I have the freeems toolchain rocking and the firmware compiles nicely so no problems there...

That's not even necessary! Check this out: http://builds.freeems.org/ similarly, Mike has his tuner available as a build too: http://mikesshop.net/EMStudio/

Quote:
The USBDM page mentions something about "standalone programmers"? Is anyone using these to program the bootloader (SM) part?

Yes, pretty much everyone who's at the low-level hw hacking phase of their life.

Quote:
The install script needs the codewarrior (damn), so I made a striped down version of the install script to make this work without the cw stuff. It just copies the library files to ld path, makes symlinks, ldconfigs, adds usb rules file, copies devicedata and flashimages to /usr/local/share/usbdm. Now it starts ok , but I don't have the USB device yet, so time will tell if the install was successful...

A minute late and a dollar short: viewtopic.php?f=9&t=1884 if your script looks like mine, it'll work fine. I have to run mine as root, though.

_________________
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!


Sun Dec 02, 2012 2:53 pm
Profile WWW
Moderator
User avatar

Joined: Tue Jan 15, 2008 2:31 pm
Posts: 15181
Location: Home sweet home!
PS, I was wondering how your post escaped the spammer filter: You signed up 2+ years ago! And from today's IP and the sign up IP, you've only moved ~500kms south since then too! :-)

_________________
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!


Sun Dec 02, 2012 3:00 pm
Profile WWW
QFP80 - Contributor
User avatar

Joined: Tue Jul 06, 2010 1:03 pm
Posts: 45
Location: Espoo, Finland
Thanks for the reply, It sure clears out things...

Yep, I signed up a while back but didn't have anything to share at that time ;). Spam filter? Do you need to post once a week and be constantly on the move (over 500km radius) so that your posts won't be ruled out as spam ;) Just kidding...

I could post my plan as a separate thread. I might need some insight on some HW choices...

FYI I'm also developing an android app for my tuning needs. My early demo now runs with MS2 as a dashboard with fixed gauges. I got it to work with my prolific usb serial dongle without rooting the device using the usb host mode (android 3.1+). Not a big fan of bluetooth ;).


Sun Dec 02, 2012 4:45 pm
Profile
Moderator
User avatar

Joined: Tue Jan 15, 2008 2:31 pm
Posts: 15181
Location: Home sweet home!
Re spammers: viewtopic.php?f=17&t=1311 :-)

_________________
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!


Sun Dec 02, 2012 10:07 pm
Profile WWW
QFP80 - Contributor
User avatar

Joined: Tue Jul 06, 2010 1:03 pm
Posts: 45
Location: Espoo, Finland
I'll just put this blog url here if someone stumbles across this topic...

http://roller.baboonplanet.com/garage/entry/setting_up_freeems_firmware_on

Just a walkthough based on the CardS12X board.


Mon Feb 18, 2013 12:00 pm
Profile
TO92 - Vaguely active
User avatar

Joined: Tue Feb 19, 2013 9:27 pm
Posts: 3
Location: Netherlands
MrOnion,

Nice and helpful for getting started. And thanks for the tip for the BDM programmer, I almost bought the one from elmicro which is around 200 euro's!
One minor thing (I know your website is obviously under construction) it would be nice if you could click on your images to enlarge them.


Wed Feb 20, 2013 8:12 pm
Profile
QFP80 - Contributor
User avatar

Joined: Sat Aug 16, 2008 4:39 pm
Posts: 57
Location: Se oli ainakin näiiiiiin iso!
To get TBDM gixxer-harry had problems with working follow instructions on this thread: viewtopic.php?f=9&t=2141

Pin-out and schematics for Wayengineer MC9S12XDP512 board can now be downloaded from Wayengineer page. I also put up mirror of it online and attached relevant part to this post. It's all in chinese but schematics and pinouts are readable.


Attachments:
File comment: pinouts and schematics for Wayengineer MC9S12XDP512-core
XDP512核心板原理图.pdf [84.72 KiB]
Downloaded 190 times
Sat Jun 01, 2013 12:08 pm
Profile
LQFP112 - Up with the play
User avatar

Joined: Fri Aug 16, 2013 9:40 am
Posts: 113
Hm, today I laid my hand upon a http://elmicro.com/en/cards12.html with a MC9S12xdp512CAL and the PE USB BDM. I will read the previous posts first before asking (some) questions but it seems to be fate that I found this board at work within a week of registering here ;)


Last edited by Matthijs on Wed Aug 21, 2013 2:38 pm, edited 1 time in total.



Wed Aug 21, 2013 1:45 pm
Profile
Moderator
User avatar

Joined: Tue Jan 15, 2008 2:31 pm
Posts: 15181
Location: Home sweet home!
faith > fate? :-)

_________________
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!


Wed Aug 21, 2013 2:17 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 82 posts ]  Go to page Previous  1 ... 5, 6, 7, 8, 9  Next

Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software for PTF. ColorizeIt.