#milkymist IRC log for Tuesday, 2011-11-08

wpwrakhmm, a bit of cargo-cult programming in lm32.h ... nothing too serious, though00:24
kristianpaullekernel: if i switch froma 50Mhz to clock to a 16.384 Mhz (reusing clock out for memcard), do i have to consider something about the sdram controller?03:57
wpwrakxiangfu: did you build and run the CVS version of RTEMS yet ? the one with the scheduling problem. if yes, have you been able to observe that scheduling problem ?05:30
xiangfuwpwrak, all the image behind '09xx2011' is using CVS "http://fidelio.qi-hardware.com/~xiangfu/build-milkymist/"05:32
wpwrakoh, cool. so you can also reproduce that hang/lag ?05:33
xiangfuwpwrak, yes.05:33
xiangfuwpwrak, wait. let me find the irc log.05:33
xiangfuthe VERSIONS file is not correct on RTEMS: http://fidelio.qi-hardware.com/~xiangfu/build-milkymist/milkymist-firmware-11072011-1742/VERSIONS05:34
wpwrakexcellent. would you mind trying the patch i sent today, in the mail "likely bug in RTEMS CVS"05:34
wpwraki'm kind curious if this may solve that problem :)05:34
xiangfuwpwrak, recompile the whole rtems/flickernoise needs ~30 minute in my pc. I will report after compile .05:36
wpwrakthanks !05:36
wpwrakmeanwhile, i'll also try to figure out how to build rtems ...05:37
xiangfunetwork is slow :(05:49
wpwrakit always is when you're waiting ;-)05:51
xiangfuwpwrak, checkout the Makefile under : https://github.com/milkymist/scripts/tree/master/compile-flickernoise06:03
xiangfuopen this webpage use 6 minutes.06:03
xiangfuon how to compile rtems.06:03
wpwrakyes, i'm examining it already, thanks !06:04
wpwrak6 minutes for a few kB is a little slow indeed ;)06:04
xiangfuthe GFW people works very very hard.06:05
xiangfuwpwrak, compile the new flickernoise with your rtems patch.09:01
wpwrakxiangfu: how's the patched rtems ? did it build ? :)13:37
xiangfuI am testing now.13:39
xiangfuyes. it compile fine.13:39
xiangfutesting try to reproduce the bug now.13:39
xiangfuthe bug still there.13:43
xiangfuI do 2 test. (http://en.qi-hardware.com/mmlogs/milkymist_2011-09-07.log.html#t08:50)13:43
xiangfu1. direct rendering.13:43
xiangfu2. delete all patches. try 'Reboot' and 'Shutdown'13:44
xiangfujust finish [1]. now I delete all patches. test [2]13:44
wpwrak(bug still there) damn ! :-(13:45
xiangfutest_2: same as before.13:48
xiangfu'Reboot' and 'Shutdown' not working. when start the 'Video in' preview. became very very slow.13:48
wpwrakah well, at least we know it wasn't that. sebastien should be happy hat we're leaving some bugs for him to chase :) thanks for testing !13:50
lekernelif we are lucky, the reboot/shutdown not working symptoms will be easy to reproduce with a 5-line test program13:54
lekernelbtw, this was changed: https://www.rtems.org/bugzilla/show_bug.cgi?id=182413:55
wpwrakhmm, but doesn't the lag happen without reboot/shutdown ?13:58
wpwrakor is this something else ?13:58
xiangfuthis bug also cause some input problem.13:59
lekernelwpwrak, maybe there are two bugs, or maybe not. I don't know.14:00
lekernela 1st step would be to write a 5-line program that attempts to shutdown/reboot and debug it if it doesn't work14:00
wpwraklekernel: i think that one will still wait for you :) i'm still chasing the MIDI/mouse hang and then i'll be after more patch control. trying that fix on RTEMS CVS was just an attempt to see if there was a low-hanging fruit we could collect on the way. alas, there wasn't.14:54
lekerneldoes the MIDI/mouse hang happen with RTEMS CVS?15:13
wpwraki don't know. i'm now trying to figure out how to build the thing from sources.15:19
lekernel./bootstrap -c && ./bootstrap && ./bootstrap -p15:22
lekernelmkdir ../conf15:22
lekernelcd ../conf15:22
lekernel../rtems/configure --target=lm32-rtems4.11 --enable-rtemsbsp=milkymist --enable-posix --disable-itron --enable-networking --disable-multiprocessing --disable-tests --prefix=/opt/rtems-4.1115:22
lekernelmake install15:22
wpwrak"cd ../conf" ? there's no such thing. xiangfu has a build_dir. maybe you mean that ?15:23
xiangfuyes. I think so. :)15:25
lekernelI also said: "mkdir ../conf". and yes, that's probably xiangfu's build_dir15:26
lekernelit's just a regular out-of-tree build with autocrap ...15:26
wpwrakaah, sorry. didn't see that15:27
wpwraki'll call it "build" :)15:27
wpwrakquite amazing to see how inefficient autocrap is for such a large project. the linux kernel configures in maybe 1% of the time ;-))15:30
wpwrakoh, and i found another inconsistency in cpukit/score/cpu/lm32/rtems/score/cpu.h: #define CPU_ALIGNMENT 8 vs. #define CPU_STACK_ALIGNMENT 415:32
wpwrakcomments say that CPU_STACK_ALIGNMENT must be either zero or >= CPU_ALIGNMENT. not sure if it has any ill effects, though.15:33
wpwrakand of course, CPU_swap_u16, is another fine example for how not to write a macro :) but i don't think this causes any trouble at the moment either15:34
lekernelsure, sure, we'll switch to Linux when it works :-)15:34
lekernelthough I can tell you the GNU stuff isn't brilliant either, even if the kernel is generally OK15:35
xiangfuwpwrak, what kernel module of atben needs? I don't know how to add the /dev/tun0 in ben nanonote.15:35
wpwrakat "make", i get  configure: error: missing define CLOCK_PROCESS_CPUTIME_ID15:36
xiangfuwpwrak, I have add the kmod-sit/ipv6/iptunnel4 . how to make the /dev/tun0 works?15:36
lekernelah, you need to upgrade the GCC toolchain/newlib15:36
lekernelyou can use the latest binary packages from the RTEMS FTP15:36
xiangfuor using : http://fidelio.qi-hardware.com/~xiangfu/build-milkymist/milkymist-firmware-11072011-1742/Flickernoise-lm32-rtems-4.11-SDK-for-Linux-x86_64.tar.bz2 :)15:36
wpwrakxiangfu: i've answered over at #qi-hardware :)15:37
wpwrakdownloading ...15:39
kristianpaullekernel: Hi, do I need to consider something about SDRAM core when changing SoC system clock?15:42
kristianpaulOr if fill the right values in setup.v all should be OKAY if the timing is met in sinthesys ?15:42
kristianpaulabout setup.v of course i mean right values for CLOCK_FREQUENCY and CLOCK_PERIOD15:43
lekernelusually yes15:44
lekernelwhat frequency?15:44
kristianpaul81920000 Hz15:44
lekernelwhy? that's a small change15:44
kristianpaulwell seems not at all, as i'm not using the 50Mhz osc15:48
wpwraknice. it's compiling now. thanks !15:48
wpwraktime to "make": real 1m10.309s15:48
kristianpaulat least, i managed to have a another CSR bus with different clock doimain :-)15:48
kristianpaulwich i'm open for suguestions about how to deal with crossing clocks there :)15:49
wpwraknow ... rtems and FN are just one big image, correct ? i.e., when i rebuild FN, it'll pick up the new rtems, right ?15:50
kristianpaulone image yes15:50
wpwrakmain.c:49:19: fatal error: yaffs.h: No such file or directory15:51
kristianpaulthe joy of copile FN by hand :-)15:51
wpwrakyeah :)15:51
wpwrakrtems/rtems_yaffs.c:63:1: warning: 'rtems_off64_t' is deprecated15:54
wpwrakbut at least it didn't fail :)15:54
wpwrakbut there's still no yaffs.h :-(15:56
lekernelwhat YAFFS repository are you using? you need to use the new one for the nex RTEMS15:57
wpwrakah, i didn't switch branches. let's do that ...15:57
wpwrakthat's better15:58
wpwrakokay, i see the "lag" :)15:59
wpwrakthe "lag" looks like a massive loss of events16:06
wpwrakand i don't see the MIDI hang with it. but it may simply mask it.16:07
lekernelit's more than that - the shell doesn't work either16:08
wpwrakyou mean the serial console ?16:09
lekernelbtw if you just open the MIDI settings, the lag bug doesn't manifest itself, does it?16:09
wpwrakindeed. but i had problems with it from time to time also before.16:09
wpwraki haven't tried yet without FN auto-starting a first patch16:09
wpwrakyeah, serial console seem completely dead16:11
wpwraklet's try without autostart16:11
wpwrakno lag without rendering. and the console works16:12
wpwrakand i can still kill MIDI. yes ! it's just a bit more work16:13
wpwrakwell, just a little bit more work16:20
wpwrakno task seems to be running to cause the lag16:53
wpwrakat least according to rtems_cpu_usage_report16:53
wpwrakwhat is the system-wide clock tick counter called ? (the equivalent to "jiffies" on linux)16:55
wpwrakah, _Watchdog_Ticks_since_boot looks good16:58
wpwrakseems that the system timer stops ticking16:58
wpwrak_Watchdog_Ticks_since_boot should increment at about 100 Hz, correct ?16:59
wpwraki think i can answer my own question: yes17:33
wpwrakwhen the variable monitor causes the loss of ticks, this happens as a consequence of  rtems_task_start(sampler_task_id, sampler_task, ...17:34
wpwrakat the very end of sampler_start17:34
wpwrakif i return just before it, the system remains healthy (until i try to close the variable monitor. but it's okay if it malfunctions at that point, since i left everything in an inconsistent state)17:35
wpwraknow let's see what atrocities are being committed inside sampler_task ...17:39
Fallenouwin 4117:40
wpwrakbingo ?17:40
Fallenouahah sorry wrong irssi command17:40
wpwrakfurther reduction: if i remove the  ioctl(snd_fd, SOUND_SND_SUBMIT_RECORD,  in sampler_task, the loss of tick doesn't happen17:59
wpwrakbut let's double-check this ...18:01
wpwrakyup, confirmed. if i just comment out the ioctl, there's no lag. now, on with ac97.c ...18:04
wpwrakaha. reducing submit_record to  bsp_interrupt_vector_disable(MM_IRQ_AC97DMAW); bsp_interrupt_vector_enable(MM_IRQ_AC97DMAW); return RTEMS_UNSATISFIED;  also produces the loss of tick18:10
wpwraklekernel: are the ticks derived from MM_IRQ_AC97DMAW ?18:11
wpwrakheh heh18:16
wpwrakand yes, incompetence kills18:17
wpwraklet's see how things are with correct macros ...18:21
wpwrakmuch better :)18:23
wpwrakalas, none of this helped with my MIDI problem :-(18:29
wpwrakoh, cool. now the M1 auto-rebooted ;-)18:30
wpwrak(while hanging on MIDI) maybe that was the watchdog18:30
wpwrakRTEMS CVS with FN HEAD feels pretty good. at least my tornado derivative with (real) MIDI seems to work normally19:14
wpwrak(normally = still with the possibility of hanging the system, though it doesn't happen very often)19:41
wpwrakwolfspraul: regarding controls, there may be different styles of playing the M1: one would be "hands on", where you adjust controls quite often. the other would be "hands off", where you make occasional changes but let the M1 auto-follow the music.21:52
wpwrakin the latter case, controls that "remember" their position might actually be quite convenient, because you may forgot where you, say, last touched the pad, and when you want to make a small change later, you may hit it at a completely different location21:54
lekernelnice gems you are digging out... "nothing serious" heh21:55
wpwrakyeah, i'm starting to miss the reviewers who are usually between me and such bugs in linux. people who are complaining about it being so damn hard to get things into the kernel don't know what they're missing :-)22:07
wpwraki kinda wonder if the MIDI hang is also a macro argument gone wild :)22:07
wpwrakbtw, maybe it would be a good idea to plan for a new firmware release soonish ? there's a fair number of things that have changed since july. some may notice the difference.22:10
wpwraki'd want the MIDI/mouse hang properly dead first, though. with the latest RTEMS, it seems to happen infrequently that you may not hit it if you don't force things, but still22:11
lekernelwpwrak, btw, I posted on the RTEMS ML about that rb thing22:20
lekernelnew firmware, yes22:20
lekernelnext week maybe22:20
wpwraknext week sounds good to me22:22
wpwrak(rb tree bug) thanks !22:22
lekerneli'll also fix the VGA pixel clock frequency in the bitstream... let's see if it fixes that signal detection problem22:23
wpwrakdo we have "permanent" access to any equipment that exhibits VGA problems ?22:26
lekernelof course not! :)22:27
wpwrakright. that would be too easy :)22:27
lekernelthere's perhaps that one projector that detected it as 2048x something... I'm not exactly sure whose it is, but I'm meeting those guys on Thursday. will check out...22:29
wpwrakah, great22:29
wpwrak*grin* rtems/cpukit/score/include/rtems/score/bitfield.h  _Bitfield_Find_first_bit has an interesting way to dodge the bullet. of course, if there was a typo and _value became __value or vice versa, would anyone notice ? :)22:32
wpwrakbut they really love their macros. even where an inline function would do the job perfectly.22:36
lekernelseen the glibc already? :-)22:37
wpwrakthat looks like "task-specific language". that may not be horrible. at least in that example, i don't see any problems22:41
mwallethese uboot guys22:45
wpwrakdid they sink your pleasure yacht ?22:47
mwallehaha :b22:48
wpwrakcpukit/score/include/rtems/ looks a lot more sane. found just one more, in coremutex.h22:49
mwalle"no hardcoded mac addresses allowed" in mainline, but grepping for it digs out plenty of boards with exactly this behaviour22:50
wpwrakthe spirit is strong but the meat is weak :)22:52
wpwrakand another one, cleverly hidden in rtems/cpukit/score/inline/rtems/score/threadmp.inl22:52
wpwrakat least that one shouldn't bother us, i think22:53
wpwrakalas, the hang is still there22:55
mwallewpwrak: which rtems are you using? cvs head? official git?22:59
wpwrakcvs head. i think the git isn't ready yes, is it ?22:59
mwalle#define CPU_STACK_ALIGNMENT        023:00
mwalletriggered a bug23:00
mwallesee PR 169723:00
mwalleiirc the alignments on all archs were changed to something other than 023:01
mwalleand the documentation is wrong there23:02
mwallethat is 0 is not a valid value23:02
lekernelok, shall we set all alignments to 4 and fix the documentation instead?23:02
mwallebut i dont have an idea about the latest cvs head :)23:02
mwalleyeah CPU_ALIGNMENT = 4 makes sense imho23:03
wpwraki felt a little queasy about the 023:03
wpwrak4 sounds good to me, too23:04
mwalle((uintptr_t) _CPU_Interrupt_stack_high & ~(CPU_STACK_ALIGNMENT - 1));23:04
mwallecould someone confirm that this line exists in the latest head?23:04
mwalledunno in which file i have to look23:05
wpwraksearching ...23:06
wpwrak./cpukit/score/src/isr.c:    ((uintptr_t) _CPU_Interrupt_stack_high & ~(CPU_STACK_ALIGNMENT - 1));23:06
wpwrakMIDI hang is still there23:10
mwalleok so #define CPU_STACk_ALIGNMENT 0 makes no sense :)23:12
wpwrakwell, it's a nice way of saying "0" ;-)23:14
wpwrakhmm ... did i write "CVS HEAD" ? :-(23:22
mwalleneed to go to bed, stupid discussion about hardcoded mac addresses23:27
mwallehttp://zombie-storage.com/?p=95 << lol?23:29
lekernelwpwrak, did you test with CPU_ALIGNMENT=4?23:36
wpwrakyes. no change.23:36
lekernelwpwrak, can you remove the misleading comments with your patch as well?23:39
wpwrakalright ...23:47
wpwrak(rb tree) hmm, so he wants to add a type check, too. assigning to an intermediate variable would accomplish that.23:54
wpwrakand indeed, that's how linux does it :) http://pastebin.com/eBNg9ZVB23:59
wpwraknot sure if typeof is welcome in RTEMS, though23:59
--- Wed Nov 9 201100:00

Generated by irclog2html.py 2.9.2 by Marius Gedminas - find it at mg.pov.lt!