sb0 changed the topic of #m-labs to: ARTIQ, Migen, MiSoC, Mixxeo & other M-Labs projects :: fka #milkymist :: Logs http://irclog.whitequark.org/m-labs
<sb0> sturmflut2, android kernel still crashes here
fengling has quit [Quit: WeeChat 1.1.1]
sturmflut2 has quit [Ping timeout: 272 seconds]
sturmflut2 has joined #m-labs
<sb0> ysionneau, did you get minicon to work with ddr? it might be a good idea to use it with ddr3 on the kc705 as well ...
<ysionneau> sb0: not yet
larsc has joined #m-labs
<ysionneau> sb0: what was the reason to add "set -e" to artiq_flash.sh script to make it fail at the first encountered error?
<sb0> yes
<ysionneau> I mean, why make it fail like that?
<sb0> unfortunately, it doesn't work very well because xc3sprog doesn't set a different status code when it fails
<ysionneau> yep :/
<sb0> to help prevent the script print "done" when something has gone wrong
<ysionneau> hum ok
<ysionneau> for instance when I forget to put -t pipistrello (and therefore it choses the cable for kc705) then the first xc3sprog fails and the script just returns without printing anything
<ysionneau> maybe I can put the set -e later, right before the first flashing
<sb0> yes, that's a xc3sprog problem, it should return a different status code
<sb0> set -e will catch other errors, unfortunately not the xc3sprog ones (which are also the most common...)
<ysionneau> what I don't get is why the "trap ERR" was not enough and set -e was needed
<ysionneau> since in the trap I do exit 1
<ysionneau> trap is supposed to run a handler if some error that might have caused a set -e script to abort happens
<sb0> er, doesn't trap deal with signals, no status code?
<sb0> "trap is a shell builtin which executes the command when the shell receives signal"
<ysionneau> trap <function_name> ERR will call function_name in case of a command failure
<ysionneau> A SIGNAL_SPEC of ERR means to execute ARG each time a command's failure would cause the shell to exit when the -e option is enabled.
<sb0> ah: "The KornShell uses an ERR trap that is triggered whenever set −e would cause an exit. This is allowable as an extension, but was not mandated, as other shells have not used it."
<sb0> looks like a pretty obscure feature. i'd stick with "set -e" only.
<ysionneau> bash has this feature at least
<sb0> also, the "set -e" should be the first thing in the script
<ysionneau> but not sh
<ysionneau> set -e being the first thing in the script makes some of the error checking in the script useless
<ysionneau> for instance the message that warns that maybe there is issue to access usb device
<ysionneau> and tells to use the udev script
<ysionneau> I would put the set -e at least right after this
<ysionneau> (in place of the trap ERR)
<ysionneau> this way you don't get the "Done." but you can still get some useful warning
<ysionneau> (I mean you don't get the "Done." when there is a flashing error)
<sb0> without set -e at the beginning, ARTIQ_PREFIX can be silently set wrong (or not set) if there is a problem with the artiq or python install, for example
<ysionneau> ah, right
<ysionneau> ok let's keep it this way then :(
<ysionneau> too bad trap ERR is not standard
<ysionneau> I'll clean it up and remove the trap then
<sb0> maybe you can do set +e/set -e around manual error checks for status codes
<ysionneau> ah yes, indeed
<sb0> but well. shell is a lousy programming language.
<ysionneau> it's horrible
<ysionneau> writing a really *portable* shell script is a nightmare
<ysionneau> sb0: since with mkfs we can generate a flashable file with the FS, I can add a -f FILE option to artiq_flash.sh to flash the fs. In fact I already did it in my local tree for testing purposes I can just push it if it's OK
<sb0> artiq_mkfs is a stopgap solution because your fs_write did not work. eventually, the flash filesystem should be accessible remotely, without jtag
<ysionneau> yep I'm doing the implementation of the remote access right now
<ysionneau> ok so no need for the flash file solution then
<GitHub194> [artiq] fallen pushed 1 new commit to master: http://git.io/vUyO5
<GitHub194> artiq/master e9b166b Yann Sionneau: artiq_flash.sh: some cleanup
<mindrunner> how can I write byte by byte with a DMAWriter? If I try to write single bytes, I always end up in having every 8th byte modified in my memory? Is that expected? I am using a slightly modified version of the memtest module
felix_ has quit [Ping timeout: 256 seconds]
travis-ci has joined #m-labs
<travis-ci> fallen/artiq#161 (flash_storage_for_sb - 036b27b : Yann Sionneau): The build has errored.
travis-ci has left #m-labs [#m-labs]
antgreen has quit [Ping timeout: 246 seconds]
lars_ has joined #m-labs
felix_ has joined #m-labs
mumptai has quit [Ping timeout: 276 seconds]
mumptai has joined #m-labs
aeris has quit [Read error: Connection reset by peer]
aeris has joined #m-labs
aeris has quit [Ping timeout: 265 seconds]
aeris has joined #m-labs
mumptai has quit [Quit: Verlassend]
mumptai has joined #m-labs
cr1901_modern has quit [Quit: Leaving.]
mumptai has quit [Remote host closed the connection]