simduino on OS-X : 'Inappropriate ioctl for device' 'programmer is not responding'

766 views
Skip to first unread message

Robert Nees

unread,
Jan 20, 2014, 2:12:12 AM1/20/14
to sim...@googlegroups.com
Pulling simavr from Github and compiling on OS-X 10.9.1 (version info at end of post). simavr is working and I can load my custom hex files fine. All the other examples are running fine, but am looking at building a custom arduino sim for a project that I am starting and am having no joy in getting avrdude to load a hex file.

I have exported the term env and can launch simduino and the glut window opens along with xterm/picocom in another (when SIMAVR_UART_XTERM=1 is set, but I can not get avrdude to push a hex file (ioctl("TIOCMGET"): Inappropriate ioctl for device avrdude: stk500_recv(): programmer is not responding).

The terminal window displays 2, 3 or 4 zeros during the avrdude process is running so I assuming socat is creating the ptty fine, not sure if I am just overlooking something simple? 

Thanks in advance, -R

obj-x86_64-apple-darwin13.0.0/simduino.elf 

read_ihex_file: ATmegaBOOT_168_atmega328.ihex, unsupported check type 03

Booloader 7800: 1950

uart_pty_init bridge on port *** /dev/ttys000 ***

uart_pty_init tap on port *** /dev/ttys004 ***

uart_pty_connect: /tmp/simavr-uart0 now points to /dev/ttys000

2014-01-19 22:48:39.752 simduino.elf[87254:507] Loading Maximizer into bundle: (null)



avrdude -p m328p -c arduino -P /tmp/simavr-uart0 -U flash:w:atmega328p_dummy_blinky.hex

ioctl("TIOCMGET"): Inappropriate ioctl for device

ioctl("TIOCMGET"): Inappropriate ioctl for device

avrdude: stk500_recv(): programmer is not responding

ioctl("TIOCMGET"): Inappropriate ioctl for device


avrdude done.  Thank you.


gcc -v

Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1

Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)

Target: x86_64-apple-darwin13.0.0

Thread model: posix


M P

unread,
Jan 20, 2014, 5:31:06 AM1/20/14
to simavr
The TIOC* errors are pretty normal; avrdude tries to change 'serial' parameters on what is not a serial port (a pseudo TTY) and fails -- you can safely ignore that.

For the hang, it /should/ work, I had a close look at that code last week and fixed the race condition in pty_uart, and now it works pretty reliably.

So make sure you have the latest git version from github..
M



--
You received this message because you are subscribed to the Google Groups "simavr" group.
To unsubscribe from this group and stop receiving emails from it, send an email to simavr+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Robert Nees

unread,
Jan 20, 2014, 6:16:44 AM1/20/14
to sim...@googlegroups.com
Thanks for reply.

I've been there the TIOCMGET errors under perl, 'assumed' they were ok... but you never know.

I can not get the "ATmegaBOOT_168_atmega328.ihex" bootloader to work at all.

I have been playing around with different boot loaders as my new project will require a custom Arduino loader and I am seeing some flaky timing issues between the time from starting simduino and starting avrdude... 

I have a couple of old custom 20mhz boot loaders for the 328p from a different Arduino project and they work about 50% of the time to competition. The other 50% of time they hang at various points in the flash progress and avrdude reports programmer not ready (using -vvvv to track the progress, but failures are all over the map..).

I tried the optiboot loader straight from googlecode, no joy at all... 

I tried avrdude Version 5.11.1 (from CrossPack) and Version 5.11 (from Arduino), same results.
I have to pull source to see if these versions are close to being 'new'.

You have source for the bootloader that you are including in the simduino dir?

Thanks again,

-R
Reply all
Reply to author
Forward
0 new messages