#robotics Logs

Nov 16 2011

#robotics Calendar


13:00 Tom_itx zhanx you'll have to tell me how you did it
14:01 aggrav8d anyone here make arduino project with more than one file? I'm trying to split my project up with some header files and arduino is refusing to find and use the headers.
16:04 zhanx Tom_itx, too easy
16:04 zhanx http://tinyfabland.blogspot.com/2011/11/more-stm32f4.html <- or you want the straight code?
16:05 zhanx aggrav8d, they must be in the same folder etc and i used .h for them also but it was trickey
17:02 Tom_itx i'll take code if you have it
17:11 zhanx for?
17:11 zhanx oh
17:11 zhanx cd ~/stlink
17:12 zhanx ./flash/flash write path/to/file_name.bin 0x8000000
17:12 zhanx ./flash/flash write /path/to/file_name.bin 0x8000000
17:12 zhanx forgot a /
17:12 zhanx more of commands really
17:12 zhanx and also
17:12 zhanx update your git of stlink they updated it
17:13 aggrav8d zhanx - yeah, i put it in the same folder.
17:13 aggrav8d refused to recognize the class defined in the .h file
17:13 zhanx pastebin your class
17:32 Tom_itx i think i have the wrong stlink too
17:32 Tom_itx .bin or .hex?
17:33 zhanx .bin
17:39 Tom_itx zhanx where did you get your copy of stlink and what tool chain are you using?
17:40 Tom_itx there are several stlink variations out there
17:42 zhanx git clone https://github.com/texane/stlink.git
17:44 Tom_itx i've been told his fails
17:44 Tom_itx unless you fixed it
17:45 zhanx worked for me today
17:45 zhanx pllus it was updated 3 days ago
17:45 Tom_itx oh
17:46 zhanx and it has the demo apps from st in it now
17:47 Tom_itx is the 0x8000000 the start of flash ram?
17:50 zhanx yep
18:05 zhanx get it tom?
18:05 Tom_itx not yet
18:06 Tom_itx was showering etc
18:06 Tom_itx very likely to doze off here
18:08 Tom_itx what did you use for a blink program?
18:08 zhanx the blink in the stlink example folder for the flash
18:08 zhanx err ram
18:08 Tom_itx ok
18:42 Tom_itx ok i downloaded a fresh stlink copy
18:44 zhanx k
18:44 zhanx cd stlink
18:44 zhanx make
18:45 zhanx you got a terminal open but you will need 3 tabs ok
18:45 zhanx sudo ./gdbserver/st-util fu bar <-will start the listener and the new version of stlink doesn't have the exit problem as before
18:46 zhanx on another terminal run this cd ~/stlink/example/stm32f4/Projects/discovery_demo
18:46 zhanx sudo ./gdbserver/st-util fu bar <-will start the listener and the new version of stlink doesn't have the exit problem as before
18:46 zhanx and then make in that demo folder
18:47 zhanx ./flash/flash write example/stm32f4/Projects/discovery_demo/STM32F4-Discovery_Demo.bin 0x8000000 in the third terminal will upload it
18:47 Tom_itx i'll see if i have things set up right
18:47 Tom_itx i doubt it
18:48 atom1 non-option ARGV-elements: fu bar
18:48 atom1 2011-11-16T18:39:58 WARN src/stlink-usb.c: Couldn't find any ST-Link/V2 devicestom@atom1:~/stlink$
18:49 atom1 i guess it has to be plugged in at this point?
18:49 zhanx yes
18:51 atom1 sudo ./gdbserver/st-util fu bar
18:51 zhanx yep
18:51 atom1 command not found
18:52 zhanx 4242 usb try that
18:52 zhanx wait
18:52 zhanx what is your pwd?
18:52 zhanx present working directory
18:52 atom1 my home
18:52 zhanx cd ~/stlink
18:52 atom1 err no, the demo dir
18:53 zhanx you need to have 3 terminals open
18:53 zhanx one for the stlink
18:53 zhanx one to compile easier
18:53 zhanx and one for uploading easier
18:53 atom1 ok, one is in stlink
18:53 zhanx ok
18:54 zhanx sudo ./gdbserver/st-util fu bar
18:54 atom1 listening
18:54 atom1 next terminal?
18:54 zhanx yep
18:54 zhanx to the demo code
18:55 zhanx make (in that directory)
18:55 atom1 can't find the compiler
18:55 atom1 wait..
18:55 zhanx export PATH=~/sat/bin:$PATH
18:56 atom1 make: arm-none-eabi-gcc: Command not found
18:56 atom1 make: *** [STM32F4-Discovery_Demo.elf] Error 127
18:56 zhanx export PATH=~/sat/bin:$PATH <- run that
18:56 atom1 just did
18:57 atom1 no go
18:57 zhanx and make again or was that the error again
18:57 zhanx k
18:57 atom1 i bet the compiler is all screwed up
18:57 zhanx yep
18:57 zhanx ok we fix
18:58 zhanx in your home folder run this
18:58 zhanx git clone https://github.com/esden/summon-arm-toolchain.git
18:58 zhanx cd summon-arm-toolchain
18:58 atom1 i have that one installed i believe
18:58 zhanx sudo ./summon-arm-toolchain
18:58 atom1 lemme delete that folder first
18:58 zhanx it has to make a sat folder in your home
18:59 zhanx those commands will do that (got to love updates)
19:00 atom1 ok new files gone, new terminal open
19:00 atom1 err old files gone
19:00 zhanx ok run the git command i gave
19:01 atom1 building
19:01 zhanx k
19:02 atom1 i'll take a nap while it builds
19:03 zhanx after it builds your set to upload
19:03 zhanx ./flash/flash write example/stm32f4/Projects/discovery_demo/STM32F4-Discovery_Demo.bin 0x8000000 in the third terminal will upload it
19:03 atom1 ok what's the 3rd terminal for?
19:03 zhanx but you have to be in the ~/stlink directory for that command
19:04 atom1 ok
19:04 atom1 why do you need to listen in one, compile in another and upload in a third?
19:04 zhanx so i can mod code on the fly make it, and upload it, the listener is how i connect
19:04 atom1 and how do you cleanly exit the listen one?
19:04 zhanx really you can use two but 3 is faster for changes etc
19:05 zhanx control x
19:05 atom1 is that gdb?
19:05 zhanx the upload is
19:05 zhanx not the listener
19:05 atom1 what's it for then?
19:06 zhanx to be able to connect to the stlink
19:06 atom1 shit
19:06 zhanx yea its just an extra step but needed
19:06 atom1 ./bootstrap: Error: libtool is required
19:07 zhanx sudo apt-get install flex bison libgmp3-dev libmpfr-dev libncurses5-dev libmpc-dev autoconf texinfo build-essential libftdi-dev <- make sure all the depends are there
19:08 atom1 do i need to rebuild it then?
19:08 zhanx no if they are installed your good
19:09 atom1 ok, listener is in one term
19:09 zhanx are you using a rtai kernel (i.e emc2 build?)
19:09 atom1 yes
19:09 atom1 other is in the demo dir
19:09 zhanx ok listener is working right but the summon-arm-toolchain failed?
19:09 atom1 yes
19:10 atom1 let's try to compile again
19:10 zhanx k
19:10 zhanx after that failes do this and see if they are installed sudo apt-get install libsgutils2-dev libusb-1.0-dev
19:11 atom1 make: arm-none-eabi-gcc: Command not found
19:11 atom1 make: *** [STM32F4-Discovery_Demo.elf] Error 127
19:12 zhanx then go back to the summon-arm-toolchain directory and run sudo ./summon-arm-toolchain
19:12 atom1 couldn't find libusb-1.0-dev
19:12 zhanx really?
19:13 atom1 it may be installed though
19:13 zhanx doubt it
19:13 atom1 i'm not sure at this point
19:14 zhanx looking for the .deb for you
19:14 zhanx http://ftp.us.debian.org/debian/pool/main/libu/libusb-1.0/libusb-1.0-0-dev_1.0.8-6_i386.deb
19:15 zhanx wait
19:15 atom1 my package manager says it's installed
19:15 zhanx weirdness
19:15 atom1 libusb-1.0-0-dev
19:15 atom1 diff name
19:16 atom1 as is the other one
19:16 atom1 libsgutils2-dev
19:17 zhanx should compile then
19:17 atom1 so the summon-arm toolchain is there now
19:17 atom1 and the libs
19:17 zhanx and the big sudo apt-get install all were installed?
19:17 atom1 gimme that line again
19:18 atom1 i think so
19:18 zhanx sudo apt-get install flex bison libgmp3-dev libmpfr-dev libncurses5-dev libmpc-dev autoconf texinfo build-essential libftdi-dev
19:18 atom1 upgraded, 0 newly installed, 0 to remove and 84 not upgraded.
19:19 zhanx so yea they are all installed
19:19 zhanx weird
19:19 zhanx very weird
19:20 atom1 just 'make' in the demo dir?
19:20 zhanx yep
19:20 zhanx wait is there a sat folder here ~/
19:20 atom1 what was that path line again?
19:20 atom1 no
19:21 atom1 make one?
19:21 atom1 or is it generated?
19:21 zhanx cd ~
19:21 zhanx ls
19:21 zhanx is there a sat folder
19:21 atom1 no
19:22 zhanx then summon-arm-toolchain is not installed right
19:22 zhanx that is the compile we need to workout
19:22 zhanx cd summon-arm-toolchain
19:22 zhanx ls
19:22 zhanx err
19:22 zhanx sudo ./summon-arm-toolchain
19:22 zhanx pastebin all output for me
19:23 atom1 it's not that long
19:23 zhanx k
19:23 atom1 Settings used for this build are:
19:23 atom1 TARGET=arm-none-eabi
19:23 atom1 PREFIX=/home/tom/sat
19:23 atom1 DARWIN_OPT_PATH=/opt/local
19:23 atom1 SUDO=
19:23 atom1 QUIET=0
19:23 atom1 USE_LINARO=1
19:23 atom1 OOCD_EN=1
19:23 atom1 LIBSTM32_EN=0
19:23 atom1 LIBOPENCM3_EN=1
19:23 atom1 DEFAULT_TO_CORTEX_M3=0
19:23 atom1 CPUS=
19:23 atom1 4 cpu's detected running make with '-j5' flag
19:23 atom1 Found Linux OS.
19:23 atom1 ******************************************************************
19:23 atom1 * Cloning OpenOCD sources...
19:23 atom1 ******************************************************************
19:23 atom1 fatal: destination path 'openocd-master' already exists and is not an empty directory.
19:24 atom1 besides, rue would do it :)
19:24 zhanx make clean
19:24 atom1 no rule to make clean
19:24 zhanx sudo ./summon-arm-toolchain
19:24 zhanx hmm
19:24 zhanx ok delete and re-git it
19:25 zhanx git clone https://github.com/esden/summon-arm-toolchain.git
19:25 rue_house what would i do?
19:25 zhanx so weird it fails
19:25 zhanx paste tons of code
19:26 atom1 permission denied
19:26 zhanx ok passing you to rue, gave him the link for the install and getting some food, rue its in your pm
19:27 rue_house eeek
19:27 atom1 ok it's downloading
19:27 rue_house wait I have to get the boiler going
19:27 atom1 how to install it again?
19:27 zhanx sudo ./summon-arm-toolchain
19:27 zhanx in the folder
19:27 atom1 hang on
19:27 zhanx bbl
19:28 atom1 building
19:33 atom1 ./bootstrap: Error: libtool is required
19:40 atom1 something is screwed up
19:40 atom1 i installed the lib tools with package manager
19:45 rue_house libtool - Generic library support scrip
19:46 rue_house apt-get isntall libtool
19:46 atom1 trying it again
19:46 atom1 i did
19:46 atom1 building the arm toolchain right now.. we'll see
19:48 atom1 it may be getting further this time
19:55 Tom_itx rue_house how's the heatplant coming along?
20:06 Tom_itx that'll likely fix it. it's still building
20:26 rue_house just fired it up again
20:26 rue_house the new IR baffle is AWESOME
20:30 zhanx Tom_itx, that work for oyu
20:30 Tom_itx holy crap that took a wile
20:31 zhanx it does
20:31 Tom_itx but i think it may have worked this time
20:31 zhanx k
20:31 Tom_itx just finished
20:31 Tom_itx now
20:31 Tom_itx let's start from the beginning so i can note it
20:31 zhanx switch back to the compile window and test
20:31 Tom_itx hold on a sec
20:33 Tom_itx ok starting fresh
20:33 Tom_itx terminal 1:
20:33 Tom_itx ?
20:33 Tom_itx stlink dir
20:34 zhanx ok is the link started?
20:34 Tom_itx not yet
20:34 Tom_itx ok
20:34 Tom_itx listening
20:35 zhanx ok next compile
20:35 zhanx in the demo dir use make
20:35 Tom_itx do i need that export path line?
20:35 Tom_itx home has sat now
20:36 Tom_itx :)
20:36 zhanx you already did it right
20:36 zhanx make sure work
20:36 Tom_itx but it's owned by root it appears
20:36 Tom_itx it's got a lock on it
20:36 zhanx that should be fine
20:37 Tom_itx do i need that DISCOVERY=1 line with make?
20:37 zhanx nope
20:37 zhanx they fixed it
20:37 atom1 make: arm-none-eabi-gcc: Command not found
20:37 atom1 make: *** [STM32F4-Discovery_Demo.elf] Error 127
20:38 zhanx EXPORT PATH=~/sat/bin:$PATH
20:38 zhanx yep the path failed i guess
20:39 Tom_itx i only need to do that once right?
20:39 zhanx should
20:40 atom1 collect2: ld returned 1 exit status
20:40 atom1 make: *** [STM32F4-Discovery_Demo.elf] Error 1
20:41 zhanx cd ~/stlink/examples/stm32f4/STM32F4xx_StdPeriph_Driver/build
20:41 zhanx make
20:41 zhanx then $ cd ~/stlink/examples/stm32f4/Projects/discovery_demo
20:42 zhanx and make them see if that works
20:45 atom1 u fail
20:45 atom1 example
20:45 atom1 not examples
20:45 atom1 on the stlink one anyway
20:46 zhanx ...
20:46 zhanx i was able to upload first try
20:46 atom1 building it again
20:46 zhanx k
20:46 atom1 ok 3rd terminal
20:46 zhanx ./flash/flash write example/stm32f4/Projects/discovery_demo/STM32F4-Discovery_Demo.bin 0x8000000
20:47 zhanx should start the upload
20:47 atom1 from what dir?
20:47 zhanx ~/stlink
20:47 zhanx ~ = home
20:47 atom1 libusb couldn't open USB device /dev/bus/usb/004/002: Permission denied.
20:47 atom1 libusb requires write access to USB device nodes.
20:48 rue_house sudo...
20:48 rue_house or chmod 777 /dev/bus/usb/004/002
20:48 zhanx are you apart of the usb group
20:48 rue_house groups tom
20:48 zhanx sudo addgroup tom usb
20:48 rue_house addgroup! geez, I was always doing it the hard way
20:49 atom1 how to make it blink now?
20:49 rue_house you just done liek the 777 thing caue your all military and everything
20:49 zhanx ok
20:50 zhanx blink for ram too easy
20:50 zhanx cd ~/stlink/example/blink
20:50 zhanx make CONFIG_STM32F4_DISCOVERY=1
20:50 atom1 well it didn't do anything
20:50 zhanx did it up load?
20:50 atom1 i guess
20:50 atom1 but nothing happened
20:51 atom1 was it supposed to?
20:51 zhanx wait you make and then you flashed rigth
20:51 atom1 open(example/stm32f4/Projects/discovery_demo/STM32F4-Discovery_Demo.bin) == -1
20:51 zhanx and the flash gave out put like this?
20:51 atom1 2011-11-16T20:40:17 WARN src/stlink-common.c: map_file() == -1
20:51 atom1 stlink_fwrite_flash() == -1
20:51 atom1 2011-11-16T20:40:17 DEBUG src/stlink-common.c: *** stlink_close ***
20:51 atom1 last few lines
20:51 zhanx 0x8007878
20:51 zhanx 2011-11-16T10:10:15 DEBUG src/stlink-common.c: *** stlink_read_mem32 ***
20:52 zhanx 2011-11-16T10:10:15 DEBUG src/stlink-common.c: *** stlink_read_mem32 ***
20:52 zhanx 2011-11-16T10:10:15 DEBUG src/stlink-common.c: *** stlink_write_mem32 4 bytes to 0x40023c10
20:52 zhanx 2011-11-16T10:10:15 DEBUG src/stlink-common.c: (FIXME)Skipping verification for F4, not enough ram (yet)
20:52 zhanx 2011-11-16T10:10:15 DEBUG src/stlink-common.c: *** stlink_close ***
20:52 atom1 i'll paste it in garfield since he don't care
20:53 zhanx k
20:59 Tom_itx ping
22:25 uselessnumbers /who #
22:25 uselessnumbers erg
22:25 uselessnumbers ok, xchat sucks
22:26 elessnumbers pm's
22:28 rue_house hmm
22:29 home herpidina
22:36 home rue_house, hey
22:36 home rue_house, what do you do for a living?
22:52 rue_house home, electrician
22:52 home 0_0
22:52 home interesting...
22:52 rue_house funny eh?
22:52 home but but but.. 0_0
22:52 rue_house I know all this and use it for a hobby, be a electrician by day
22:53 rue_house easy job
22:53 home I guess... lol
22:53 home are you a master electrician?
22:53 rue_house na, havn't bothered with all the tests yet
22:55 Tom_itx rue_house is a fire fighter
22:55 Tom_itx and a plumber
22:55 rue_house heh
22:56 Tom_itx ok the arm thing works on ubuntu i believe
22:56 rue_house possibly an arsinist
22:57 Tom_itx alot of the problem (i knew it would be) was that it was a stripped down live cd install for emc
22:57 Tom_itx sorta like your minimal debian you built
22:57 home lol
22:58 Tom_itx what i don't get though is the demo code runs slower than the windows version
22:59 Tom_itx the leds blink at a considerably slower rate
23:02 Tom_itx hello uselessnumbers
23:02 uselessnumbers hi Tom
23:03 uselessnumbers glad you got thru the earthquakes
23:03 Tom_itx it was a mild tremor from okc but it was a first for us
23:03 Tom_itx it did shake the basement
23:04 elessnumbers
23:04 uselessnumbers lets see if this url pastes here .... http://www.ihmc.us/research.php
23:04 Tom_itx glad you came back but i was just heading to sleep
23:04 uselessnumbers i am back only a moment
23:05 uselessnumbers gnites
23:05 uselessnumbers no one is talking, i go away to