Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Sep 2013 18:02:53 -0600
From:      Ian Lepore <ian@FreeBSD.org>
To:        Torfinn Ingolfsen <torfinn.ingolfsen@getmail.no>
Cc:        freebsd-arm@FreeBSD.org
Subject:   Re: stm32flash under FreeBSD?
Message-ID:  <1379548973.1197.76.camel@revolution.hippie.lan>
In-Reply-To: <20130918215217.24905fd7f91523a0b70170b5@getmail.no>
References:  <20130918101235.e1737d4bd839f71ebf554803@getmail.no> <1379511626.1197.69.camel@revolution.hippie.lan> <20130918215217.24905fd7f91523a0b70170b5@getmail.no>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 2013-09-18 at 21:52 +0200, Torfinn Ingolfsen wrote:
> On Wed, 18 Sep 2013 07:40:26 -0600
> Ian Lepore <ian@FreeBSD.org> wrote:
> 
> > 
> > With a quick glance at the stm32flash source I'm not seeing anything
> > unusual about the way it handles the serial port.  It might be useful to
> > try "truss ./stm32flash /dev/cuaU0" and see what call it fails on and
> > what the call args are.
> 
> I always forget about truss - thanks for reminding me.
> Unfortunately, I can't make anything out of the output from truss, nothing here "pops out" to me.
> Maybe more trained eyes than mine can spot something:
> tingo@kg-core1$ truss ./stm32flash /dev/cuaU0
> __sysctl(0x7fffffffe070,0x2,0x7fffffffe08c,0x7fffffffe080,0x0,0x0) = 0 (0x0)
> mmap(0x0,688,PROT_READ|PROT_WRITE,MAP_ANON,-1,0x0) = 34365198336 (0x800535000)
> munmap(0x800535000,688)                 = 0 (0x0)
> __sysctl(0x7fffffffe0e0,0x2,0x80063f408,0x7fffffffe0d8,0x0,0x0) = 0 (0x0)
> mmap(0x0,32768,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 34365198336 (0x800535000)
> issetugid(0x800536015,0x800530684,0x80064bb10,0x80064bae0,0x5991,0x0) = 0 (0x0)
> open("/etc/libmap.conf",O_RDONLY,0666)         ERR#2 'No such file or directory'
> open("/var/run/ld-elf.so.hints",O_RDONLY,057)     = 3 (0x3)
> read(3,"Ehnt\^A\0\0\0\M^@\0\0\0002\^A\0"...,128) = 128 (0x80)
> lseek(3,0x80,SEEK_SET)                 = 128 (0x80)
> read(3,"/lib:/usr/lib:/usr/lib/compat:/u"...,306) = 306 (0x132)
> close(3)                     = 0 (0x0)
> access("/lib/libc.so.7",0)             = 0 (0x0)
> open("/lib/libc.so.7",O_RDONLY,030771340)     = 3 (0x3)
> fstat(3,{ mode=-r--r--r-- ,inode=5537727,size=1298464,blksize=32768 }) = 0 (0x0)
> pread(0x3,0x80063e2c0,0x1000,0x0,0x101010101010101,0x8080808080808080) = 4096 (0x1000)
> mmap(0x0,2371584,PROT_NONE,MAP_PRIVATE|MAP_ANON|MAP_NOCORE,-1,0x0) = 34366341120 (0x80064c000)
> mmap(0x80064c000,1085440,PROT_READ|PROT_EXEC,MAP_PRIVATE|MAP_FIXED|MAP_NOCORE,3,0x0) = 34366341120 (0x80064c000)
> mmap(0x800855000,126976,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_FIXED,3,0x109000) = 34368475136 (0x800855000)
> mmap(0x800874000,110592,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_FIXED|MAP_ANON,-1,0x0) = 34368602112 (0x800874000)
> close(3)                     = 0 (0x0)
> mmap(0x0,656,PROT_READ|PROT_WRITE,MAP_ANON,-1,0x0) = 34365231104 (0x80053d000)
> munmap(0x80053d000,656)                 = 0 (0x0)
> mmap(0x0,43904,PROT_READ|PROT_WRITE,MAP_ANON,-1,0x0) = 34365231104 (0x80053d000)
> munmap(0x80053d000,43904)             = 0 (0x0)
> sysarch(0x81,0x7fffffffe160,0x800539088,0x0,0xffffffffffcde450,0x8080808080808080) = 0 (0x0)
> sigprocmask(SIG_BLOCK,SIGHUP|SIGINT|SIGQUIT|SIGKILL|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2,0x0) = 0 (0x0)
> sigprocmask(SIG_SETMASK,0x0,0x0)         = 0 (0x0)
> __sysctl(0x7fffffffe0f0,0x2,0x80087a780,0x7fffffffe0e8,0x0,0x0) = 0 (0x0)
> sigprocmask(SIG_BLOCK,SIGHUP|SIGINT|SIGQUIT|SIGKILL|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2,0x0) = 0 (0x0)
> sigprocmask(SIG_SETMASK,0x0,0x0)         = 0 (0x0)
> fstat(1,{ mode=crw--w---- ,inode=147,size=0,blksize=4096 }) = 0 (0x0)
> __sysctl(0x7fffffffe0b0,0x2,0x800879dc8,0x7fffffffe0a8,0x0,0x0) = 0 (0x0)
> __sysctl(0x7fffffffdfd0,0x2,0x7fffffffdf60,0x7fffffffdfc8,0x8007478c0,0xc) = 0 (0x0)
> __sysctl(0x7fffffffdf60,0x2,0x800879fd0,0x7fffffffe028,0x0,0x0) = 0 (0x0)
> readlink("/etc/malloc.conf",0x7fffffffe0d0,1024) ERR#2 'No such file or directory'
> issetugid(0x800746581,0x7fffffffe0d0,0xffffffffffffffff,0x0,0x2,0x0) = 0 (0x0)
> break(0x600000)                     = 0 (0x0)
> __sysctl(0x7fffffffe360,0x2,0x7fffffffe37c,0x7fffffffe370,0x0,0x0) = 0 (0x0)
> mmap(0x0,2097152,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 34368712704 (0x80088f000)
> mmap(0x800a8f000,1511424,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 34370809856 (0x800a8f000)
> munmap(0x80088f000,1511424)             = 0 (0x0)
> ioctl(1,TIOCGETA,0xffffe540)             = 0 (0x0)
> stm32flash - http://stm32flash.googlecode.com/
> write(1,"stm32flash - http://stm32flash.g"...,47) = 47 (0x2f)
> 
> write(1,"\n",1)                     = 1 (0x1)
> open("/dev/cuaU0",O_RDWR|O_NONBLOCK|O_NOCTTY,00) = 3 (0x3)
> fcntl(3,F_SETFL,0x0)                 = 0 (0x0)
> ioctl(3,TIOCGETA,0xa07084)             = 0 (0x0)
> ioctl(3,TIOCGETA,0xa070b0)             = 0 (0x0)
> ioctl(3,TIOCFLUSH,0xffffe5c4)             = 0 (0x0)
> ioctl(3,TIOCSETA,0xa070b0)             = 0 (0x0)
> ioctl(3,TIOCGETA,0xffffe620)             = 0 (0x0)
> stat("/usr/share/nls/C/libc.cat",0x7fffffffd8b0) ERR#2 'No such file or directory'
> stat("/usr/share/nls/libc/C",0x7fffffffd8b0)     ERR#2 'No such file or directory'
> stat("/usr/local/share/nls/C/libc.cat",0x7fffffffd8b0) ERR#2 'No such file or directory'
> stat("/usr/local/share/nls/libc/C",0x7fffffffd8b0) ERR#2 'No such file or directory'
> /dev/cuaU0: No such file or directory
> writev(0x2,0x7fffffffddf0,0x4,0x19,0x1b4664,0x800a00128) = 38 (0x26)
> ioctl(3,TIOCFLUSH,0xffffe624)             = 0 (0x0)
> ioctl(3,TIOCSETA,0xa07084)             = 0 (0x0)
> close(3)                     = 0 (0x0)
> 
> write(1,"\n",1)                     = 1 (0x1)
> sigprocmask(SIG_BLOCK,SIGHUP|SIGINT|SIGQUIT|SIGKILL|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2,0x0) = 0 (0x0)
> sigprocmask(SIG_SETMASK,0x0,0x0)         = 0 (0x0)
> sigprocmask(SIG_BLOCK,SIGHUP|SIGINT|SIGQUIT|SIGKILL|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2,0x0) = 0 (0x0)
> sigprocmask(SIG_SETMASK,0x0,0x0)         = 0 (0x0)
> process exit, rval = 1
> 
> 

It looks to me like it's complaining about not finding libc's nls files
(which I would think would be in /usr/local/share), as if a required
port is missing or something.  Or maybe ports with conflicting NLS
options are installed.  Then it mangles the error reporting to make it
look like the tty device was the thing not found.

-- Ian





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1379548973.1197.76.camel>