Anyone with FreeBSD?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Anyone with FreeBSD?

4,477 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by gogamoga on Mon Apr 16 11:46:57 MST 2012
Anyone has any luck with lpcxpresso and FreeBSD?
If yes share please.... or.. any info would be helpful.
0 Kudos
Reply
27 Replies

4,056 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by gogamoga on Wed May 09 04:58:51 MST 2012
Lol, just walking trough the sorces of OLPC-Link i noticed that i forgot to put CR_Close prototype into OLPC_Link.h.

Either add
int CR_Close(void);
to the libOLPC_Link-0.1/src/OLPC_Link.h by hand
or get the attached patch file and:
cp OLPC_Link_patch.txt OLPC_Link-0.1/src
cd OLPC_Link-0.1/src
patch <OLPC_Link_patch.txt
rm OLPC_Link_patch.txt
cd ..
make dist


new patched tar.gz will be created

Sorry
0 Kudos
Reply

4,056 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by gogamoga on Mon May 07 08:56:59 MST 2012
The code is not useless for Unix and Linux (Not sure about Mac but definitely useless for windows.) I am using GNU tools with target GNU system in mind, so rpc  wrapper will work fine on gnu system and as I mentioned earlier, as a side effect of rpc, it will be possible to run the ide on one machine, and have the devboard plugged into USB on other machine (on low latency network), and also, a possibility to have multiple  devboards attached without the need to unplug the first and plug in the second one
0 Kudos
Reply

4,056 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Polux rsv on Mon May 07 08:46:40 MST 2012
With all respect, you are probably the only one playing with FreeBSD for cross-development.  :D
And as you meant, useless for the majority of us. Until someone transpose your code to something usable under windows, Linux or Mac.

Angelo
0 Kudos
Reply

4,056 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by gogamoga on Sun May 06 15:57:21 MST 2012
Well, finally I am releasing the open version of libLPC_Link (delayed by 1 day though lol, because of stupid alignment problems with union)

Anyway, get the attached file.(This is useless for Windows users. Just ignore it)

[COLOR=red]Attention![/COLOR] This release has no particular interest for you, unless you are messing with the same stuff as i do (Porting LPCXpresso to FreeBSD for example), or want to know more about how communication with the board is done on driver level (Driver level - I mean 1 layer above libusb, and not the encrypted firmware that you flash to your LPC-Link)

Well, if you are still interested, here is what you do:
[COLOR=Blue]NOTE: You will need libusb-1.0-dev on ubuntu (or something similar for your distro), - for libusb.h headers
Also, if you are on 64bit system - you need to be able to cross-compile for i686 - original libraries are 32bit and if you make it 64bit they are useless.[/COLOR]

Get the attached libOLPC_Link-0.1.zip (WTF is with retarded setting on this forum? why tar.gz are blocked?)

[COLOR=Red]As a regular user:[/COLOR]
unzip libOLPC_Link-0.1.zip
cd libOLPC_Link-0.1
mkdir olpcl
./configure --prefix=`pwd`/olpcl --host=i686-pc-linux-gnu --target=i686-pc-linux-gnu
make
make install
cd olpcl/lib
ls

There you have your fresh libOLPC_Link.so (symbolic link to actual solib - differs on different systems), which can be used as a dropin replacement for original libLPC_Link.so

Header file OLPC_Link.h is in olpcl/include and can be used for both original libLPC_Link and libOLPC_Link (Same prototypes)

To test it:
[COLOR=red]As a regular user:[/COLOR]

sudo cp -L libOLPC_Link.so <lpcxpresso_install_path>/lpcxpresso/bin
cd <lpcxpresso_install_path>/lpcxpresso/bin
sudo mv libLPC_Link.so libLPC_Link.so.bak
sudo ln -sf libOLPC_Link.so libLPC_Link.so
./dfu-util -d 0x471:0xdf55 -c 0 -t 2048 -R -D LPCXpressoWIN.enc
./crt_emu_cm3_nxp -info-emu -wire=winusb


Should read:
Ni: LPCXpresso Debug Driver v4.0 (Mar 25 2012 14:25:27)
1 Emulators available:
0. OLPCLINK_0_1 Open LPC-Link Driver v0.1 (Code Red - LPCXpresso)


If so, then you can use all your present toolset with this open driver and everything will work fine (checked myself - just for that purpose installed ubuntu lol)

Well, next step is to make RPC wrapper so lpcxpresso will work on my amd64 FreeBSD

PS.
Docs and Examples will follow later.
Time to play some BATTLEFIELD
0 Kudos
Reply

4,056 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by gogamoga on Sat May 05 15:31:47 MST 2012
Release is postponed.
I have found some problems with ide while communicating thru my open link. Going to debug it now, as soon as it works, it will be released
0 Kudos
Reply

4,056 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by gogamoga on Fri May 04 17:39:40 MST 2012
Theoretically yes (if i keep digging deeper) except for 1 thing: The encrypted firmware that you flash to LPC-Link itself - no luck with this one :P
0 Kudos
Reply

4,056 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by micrio on Fri May 04 17:28:36 MST 2012
Does this make it possible to have a full open source tool set?

Pete.
0 Kudos
Reply

4,057 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by gogamoga on Fri May 04 17:08:52 MST 2012
Well, at this very moment i have compiled the open libLPC_Link.so and it works as dropin replacement for original libLPC_Link.so by CodeRed. Going to write docs now :D and maybe an example of use.
0 Kudos
Reply

4,057 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by researchinnovation on Wed May 02 21:30:27 MST 2012
Hi...!!!

Please lets know about the progress..!!!


Thanks & Regards...!!:)
0 Kudos
Reply

4,057 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by gogamoga on Wed May 02 14:39:03 MST 2012

Quote: MacGyverQue
...was amazed at how fluid the os felt...


FLUID - THERE, Exact word i was looking for to explain the feel i get from the FreeBSD :)
Its just that - fluid - no jumpy feeling that i get from linux - no peaks and falls

PS.
Hardest part with libLPC-Link so far, is figuring out how to name the members of the packet structure used to send data lmao :P
0 Kudos
Reply

4,057 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by MacGyverQue on Wed May 02 13:55:36 MST 2012
Awesome work and congratulations. Looking forward to seeing your work. I agree, FreeBSD is an amazing os and definitely doesn't get enough credit. I first installed FreeBSD back in 2000 and was amazed at how fluid the os felt in comparison to current Linux distros at the time. Specifically regarding the installation of the OS over a dial up link (lol)
0 Kudos
Reply

4,057 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by researchinnovation on Wed May 02 04:48:09 MST 2012
@Gogamoga....!!!

OK....Thanks and Congratulation in Advance....!!!
0 Kudos
Reply

4,057 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by gogamoga on Wed May 02 04:45:59 MST 2012
By the end of the week i will release the full source for the libLPC-Link.
Its just not ready yet - have to attend to my primary work, so not much time to mess with reversing. Check on this thread by the end of the week. There will be full sources and examples ready by then (I hope)
0 Kudos
Reply

4,057 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by researchinnovation on Wed May 02 04:38:16 MST 2012
@Gogamoga....Hi...!!

OK....I understood your concern.

Can you share your code and idea what exactly you are trying to do.


Thanks & Regards.....:)
0 Kudos
Reply

4,057 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by gogamoga on Wed May 02 04:23:20 MST 2012

Quote: researchinnovation
@Gogamoga....Hi...!!!
Try UBUNTU10.



I cant stand ubuntu, it works on gentoo though, and gentoo is my fav distro,
But i am not planning to move away from FreeBSD and definitely not planning to run lpcxpresso in virtualbox.

Anyway, the most of work is done. all that is left to do is make RPC wrapper for libLPC_Link (which is peanuts compared to what i have done already :P)
and everything will work. Besides, as the side effect of the wrapper, it will be possible to remote-debug the board - even if its not connected to your machine directly :P

PS.
My parents lately asked to kick the windows out from their laptop and put linux in. They are senior people, and transition to other OS could be hard for them, even though, i will not let them experience the damn ubuntu. PCBSD is a way to go :P
0 Kudos
Reply

4,057 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by researchinnovation on Wed May 02 04:00:32 MST 2012
@Gogamoga....Hi...!!!

Is your BSD working with LPCxresso.
Try UBUNTU10.
It may help you.






Thanks & Regards...:)
0 Kudos
Reply

4,057 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by gogamoga on Tue May 01 15:03:07 MST 2012
Reversing is finished.
Preparing sources now.
0 Kudos
Reply

4,057 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by gogamoga on Sun Apr 29 08:14:00 MST 2012
this is my fun lol
PS.
original libLPC_Link will not work on big endian platform
0 Kudos
Reply

4,057 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by nkarakotas on Sun Apr 29 07:33:05 MST 2012
You must have alot of time in your heands.. :rolleyes:
0 Kudos
Reply

4,057 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by gogamoga on Sun Apr 29 06:56:39 MST 2012
Well, linux was my OS of choice for about 15 last years, i have tried multiple distros (RH, DEBIAN, SLACK, LFS, GENTOO) and my favourite so far was gentoo. I have moved to FreeBSD just recently, because i felt like making a change and learning something new. And actually, the "feel" that i get from FreeBSD is the best "feel" i ever had from OS. Though, i constantly run a gentoo instance in virtualbox. The fun is in seeing the differences and similarities between the both OSes. I am porting lpcxpresso to FreeBSD for educational reasons (And another reason is because Ubuntu annoys me :D)
0 Kudos
Reply