Discussion:
dmesg + ramlog empty... where do I start debugging?
(too old to reply)
nathan@vertile.com [nuttx]
2018-01-03 09:26:55 UTC
Permalink
hello world!


im new to nuttx, and have tried to configure sdcard + spi + fatfs


this isn't working, so I tried turning on debugging (ramlog)


however dmesg is empty:


nsh> dmesg
nsh> ls /dev/
/dev:
console
null
ramlog
ttyACM0

ttyS0


relevant (i think?) parts of the .config are...


CONFIG_DEBUG_ERROR=y
CONFIG_DEBUG_FS=y
CONFIG_DEBUG_FS_ERROR=y
CONFIG_DEBUG_SCHED=y


CONFIG_DEBUG_MEMCARD=y
CONFIG_DEBUG_MEMCARD_ERROR=y
CONFIG_DEBUG_SPI=y
CONFIG_DEBUG_SPI_ERROR=y
CONFIG_ARCH_HAVE_STACKCHECK=y
CONFIG_ARCH_HAVE_HEAPCHECK=y
CONFIG_DEBUG_SYMBOLS=y
CONFIG_ARCH_HAVE_CUSTOMOPT=y
CONFIG_DEBUG_NOOPT=y


CONFIG_RAMLOG=y
CONFIG_RAMLOG_BUFSIZE=1024
CONFIG_RAMLOG_NONBLOCKING=y

CONFIG_RAMLOG_SYSLOG=y



where do I start debugging?


my first though was stepping through the code w/ gdb, but there must be a better way?
Alan Carvalho de Assis acassis@gmail.com [nuttx]
2018-01-03 12:25:47 UTC
Permalink
Hi Nathan,

Could you please explain what exactly is not working?

Remember: System.map is your friend, did you verify if sdmmc functions
were compiled/included (if so it should appear inside System.map
file).

I created a video tutorial explaining how to use SDCard over SPI on NuttX:



Maybe it could help you.

BR,

Alan
Post by ***@vertile.com [nuttx]
hello world!
im new to nuttx, and have tried to configure sdcard + spi + fatfs
this isn't working, so I tried turning on debugging (ramlog)
nsh> dmesg
nsh> ls /dev/
console
null
ramlog
ttyACM0
ttyS0
relevant (i think?) parts of the .config are...
CONFIG_DEBUG_ERROR=y
CONFIG_DEBUG_FS=y
CONFIG_DEBUG_FS_ERROR=y
CONFIG_DEBUG_SCHED=y
CONFIG_DEBUG_MEMCARD=y
CONFIG_DEBUG_MEMCARD_ERROR=y
CONFIG_DEBUG_SPI=y
CONFIG_DEBUG_SPI_ERROR=y
CONFIG_ARCH_HAVE_STACKCHECK=y
CONFIG_ARCH_HAVE_HEAPCHECK=y
CONFIG_DEBUG_SYMBOLS=y
CONFIG_ARCH_HAVE_CUSTOMOPT=y
CONFIG_DEBUG_NOOPT=y
CONFIG_RAMLOG=y
CONFIG_RAMLOG_BUFSIZE=1024
CONFIG_RAMLOG_NONBLOCKING=y
CONFIG_RAMLOG_SYSLOG=y
where do I start debugging?
my first though was stepping through the code w/ gdb, but there must be a better way?
nathan@vertile.com [nuttx]
2018-01-04 04:49:23 UTC
Permalink
Thank you for the responses and help.

By the way, I am using the version tagged 7.23 in git. I have used tools/configure.sh to configure the target, then make menuconfig then make. I am using arm-none-eabi-* 5.4.1 (but can upgrade easily if this is an issue)


Greg, I compared my romlog config against the stm32f4discovery using tools/cmpconfig and attached the output as stm32f4discovery-uavcan-vs-newtarget.diff.


The only ram log related difference I see is that I added the following, but I'm not sure the best way to validate this.


file1:
file2: CONFIG_RAMLOG_BUFSIZE=1024


file1:
file2: CONFIG_RAMLOG_NONBLOCKING=y


Also, what is the right way to update a config folder defconfig file after running menuconfig? I see the refresh.sh --silent method is deprecated?





Alan, your videos are excellent! I actually used this as my reference when configuring.


Also, I did not know about System.map. I see the mmc files in compilation but no references to anything with the name mmc in System.map. Are the right files not being linked? Should I read through the build system maybe?


I thought maybe my board was maybe the problem, so I built a setup just like in your video:


https://photos.app.goo.gl/HlQr1nWRY8z3W0p73 https://photos.app.goo.gl/HlQr1nWRY8z3W0p73


I configured configs/stm32f103-minimum/usbnsh/defconfig and then followed the kconfig in the video


cmpconfig diff is attached as stm32f103-minimum-usbnsh.diff


I still see the same issue on the stm32f103 minimum board as my new target: the mmc files are in the build output, but not in the System.map file and no mmc device is shown via nsh /dev/


Thank you again for the help,
Nathan


---In ***@yahoogroups.com, <***@...> wrote :

Hi Nathan,

Could you please explain what exactly is not working?

Remember: System.map is your friend, did you verify if sdmmc functions
were compiled/included (if so it should appear inside System.map
file).

I created a video tutorial explaining how to use SDCard over SPI on NuttX:

http://youtu.be/0CX-d9BFLrQ http://youtu.be/0CX-d9BFLrQ

Maybe it could help you.

BR,

Alan
Post by ***@vertile.com [nuttx]
hello world!
im new to nuttx, and have tried to configure sdcard + spi + fatfs
this isn't working, so I tried turning on debugging (ramlog)
nsh> dmesg
nsh> ls /dev/
console
null
ramlog
ttyACM0
ttyS0
relevant (i think?) parts of the .config are...
CONFIG_DEBUG_ERROR=y
CONFIG_DEBUG_FS=y
CONFIG_DEBUG_FS_ERROR=y
CONFIG_DEBUG_SCHED=y
CONFIG_DEBUG_MEMCARD=y
CONFIG_DEBUG_MEMCARD_ERROR=y
CONFIG_DEBUG_SPI=y
CONFIG_DEBUG_SPI_ERROR=y
CONFIG_ARCH_HAVE_STACKCHECK=y
CONFIG_ARCH_HAVE_HEAPCHECK=y
CONFIG_DEBUG_SYMBOLS=y
CONFIG_ARCH_HAVE_CUSTOMOPT=y
CONFIG_DEBUG_NOOPT=y
CONFIG_RAMLOG=y
CONFIG_RAMLOG_BUFSIZE=1024
CONFIG_RAMLOG_NONBLOCKING=y
CONFIG_RAMLOG_SYSLOG=y
where do I start debugging?
my first though was stepping through the code w/ gdb, but there must be a better way?
spudarnia@yahoo.com [nuttx]
2018-01-04 13:09:21 UTC
Permalink
Post by ***@vertile.com [nuttx]
Also, what is the right way to update a config folder defconfig file after running menuconfig? I see the refresh.sh --silent method is deprecated?
No, it is not deprecated. tools/refresh.sh --silent <board>/<config> will update a defconfig file.
Post by ***@vertile.com [nuttx]
Also, I did not know about System.map. I see the mmc files in compilation but no references to anything with the name mmc in System.map. Are the right files not being linked? Should I read through the build system maybe?
Sounds like you are missing the logic that draws the objects into the link. You board initialization logic should include something like:

https://bitbucket.org/nuttx/nuttx/src/e4652bd3dc349d0642b5f90ee1765109b2bed3f6/configs/stm32f4discovery/src/stm32_sdio.c?at=master&fileviewer=file-view-default#stm32_sdio.c-151

Greg

spudarnia@yahoo.com [nuttx]
2018-01-03 13:44:00 UTC
Permalink
I assume that you have already read the Wiki page on the RAMLOG: http://www.nuttx.org/doku.php?id=wiki:howtos:ramlog

There are several existing configurations that uses the RAMLOG. You might also want to compare your configuration to these:

./configs/clicker2-stm32/mrf24j40-6lowpan/defconfig:CONFIG_RAMLOG=y
./configs/clicker2-stm32/mrf24j40-mac/defconfig:CONFIG_RAMLOG=y
./configs/clicker2-stm32/mrf24j40-starhub/defconfig:CONFIG_RAMLOG=y
./configs/clicker2-stm32/mrf24j40-starpoint/defconfig:CONFIG_RAMLOG=y
./configs/clicker2-stm32/xbee-6lowpan/defconfig:CONFIG_RAMLOG=y
./configs/nucleo-f303re/nxlines/defconfig:CONFIG_RAMLOG=y
./configs/nucleo-f303re/pwm/defconfig:CONFIG_RAMLOG=y
./configs/pic32mx-starterkit/nsh2/defconfig:CONFIG_RAMLOG=y
./configs/sabre-6quad/nsh/defconfig:CONFIG_RAMLOG=y
./configs/sabre-6quad/smp/defconfig:CONFIG_RAMLOG=y
./configs/sama5d2-xult/nsh/defconfig:CONFIG_RAMLOG=y
./configs/sama5d4-ek/ipv6/defconfig:CONFIG_RAMLOG=y
./configs/sama5d4-ek/nsh/defconfig:CONFIG_RAMLOG=y
./configs/sama5d4-ek/nxwm/defconfig:CONFIG_RAMLOG=y
./configs/samv71-xult/mrf24j40-starhub/defconfig:CONFIG_RAMLOG=y
./configs/stm3220g-eval/nsh2/defconfig:CONFIG_RAMLOG=y
./configs/stm3240g-eval/nsh2/defconfig:CONFIG_RAMLOG=y
./configs/stm32f4discovery/uavcan/defconfig:CONFIG_RAMLOG=y

Greg
‪Rachid EL MACHHOUR‬ ‪ rachid.elmachhour@yahoo.com [nuttx]
2018-01-03 13:50:12 UTC
Permalink
which card do you have ?

On Wednesday, 3 January 2018, 13:44:25, "***@yahoo.com [nuttx]" <***@yahoogroups.com> wrote:


  I assume that you have already read the Wiki page on the RAMLOG: http://www.nuttx.org/doku.php?id=wiki:howtos:ramlog

There are several existing configurations that uses the RAMLOG. You might also want to compare your configuration to these:

.../configs/clicker2-stm32/mrf24j40-6lowpan/defconfig:CONFIG_RAMLOG=y
.../configs/clicker2-stm32/mrf24j40-mac/defconfig:CONFIG_RAMLOG=y
.../configs/clicker2-stm32/mrf24j40-starhub/defconfig:CONFIG_RAMLOG=y
.../configs/clicker2-stm32/mrf24j40-starpoint/defconfig:CONFIG_RAMLOG=y
.../configs/clicker2-stm32/xbee-6lowpan/defconfig:CONFIG_RAMLOG=y
.../configs/nucleo-f303re/nxlines/defconfig:CONFIG_RAMLOG=y
.../configs/nucleo-f303re/pwm/defconfig:CONFIG_RAMLOG=y
.../configs/pic32mx-starterkit/nsh2/defconfig:CONFIG_RAMLOG=y
.../configs/sabre-6quad/nsh/defconfig:CONFIG_RAMLOG=y
.../configs/sabre-6quad/smp/defconfig:CONFIG_RAMLOG=y
.../configs/sama5d2-xult/nsh/defconfig:CONFIG_RAMLOG=y
.../configs/sama5d4-ek/ipv6/defconfig:CONFIG_RAMLOG=y
.../configs/sama5d4-ek/nsh/defconfig:CONFIG_RAMLOG=y
.../configs/sama5d4-ek/nxwm/defconfig:CONFIG_RAMLOG=y
.../configs/samv71-xult/mrf24j40-starhub/defconfig:CONFIG_RAMLOG=y
.../configs/stm3220g-eval/nsh2/defconfig:CONFIG_RAMLOG=y
.../configs/stm3240g-eval/nsh2/defconfig:CONFIG_RAMLOG=y
.../configs/stm32f4discovery/uavcan/defconfig:CONFIG_RAMLOG=y

Greg #yiv4984626847 #yiv4984626847 -- #yiv4984626847ygrp-mkp {border:1px solid #d8d8d8;font-family:Arial;margin:10px 0;padding:0 10px;}#yiv4984626847 #yiv4984626847ygrp-mkp hr {border:1px solid #d8d8d8;}#yiv4984626847 #yiv4984626847ygrp-mkp #yiv4984626847hd {color:#628c2a;font-size:85%;font-weight:700;line-height:122%;margin:10px 0;}#yiv4984626847 #yiv4984626847ygrp-mkp #yiv4984626847ads {margin-bottom:10px;}#yiv4984626847 #yiv4984626847ygrp-mkp .yiv4984626847ad {padding:0 0;}#yiv4984626847 #yiv4984626847ygrp-mkp .yiv4984626847ad p {margin:0;}#yiv4984626847 #yiv4984626847ygrp-mkp .yiv4984626847ad a {color:#0000ff;text-decoration:none;}#yiv4984626847 #yiv4984626847ygrp-sponsor #yiv4984626847ygrp-lc {font-family:Arial;}#yiv4984626847 #yiv4984626847ygrp-sponsor #yiv4984626847ygrp-lc #yiv4984626847hd {margin:10px 0px;font-weight:700;font-size:78%;line-height:122%;}#yiv4984626847 #yiv4984626847ygrp-sponsor #yiv4984626847ygrp-lc .yiv4984626847ad {margin-bottom:10px;padding:0 0;}#yiv4984626847 #yiv4984626847actions {font-family:Verdana;font-size:11px;padding:10px 0;}#yiv4984626847 #yiv4984626847activity {background-color:#e0ecee;float:left;font-family:Verdana;font-size:10px;padding:10px;}#yiv4984626847 #yiv4984626847activity span {font-weight:700;}#yiv4984626847 #yiv4984626847activity span:first-child {text-transform:uppercase;}#yiv4984626847 #yiv4984626847activity span a {color:#5085b6;text-decoration:none;}#yiv4984626847 #yiv4984626847activity span span {color:#ff7900;}#yiv4984626847 #yiv4984626847activity span .yiv4984626847underline {text-decoration:underline;}#yiv4984626847 .yiv4984626847attach {clear:both;display:table;font-family:Arial;font-size:12px;padding:10px 0;width:400px;}#yiv4984626847 .yiv4984626847attach div a {text-decoration:none;}#yiv4984626847 .yiv4984626847attach img {border:none;padding-right:5px;}#yiv4984626847 .yiv4984626847attach label {display:block;margin-bottom:5px;}#yiv4984626847 .yiv4984626847attach label a {text-decoration:none;}#yiv4984626847 blockquote {margin:0 0 0 4px;}#yiv4984626847 .yiv4984626847bold {font-family:Arial;font-size:13px;font-weight:700;}#yiv4984626847 .yiv4984626847bold a {text-decoration:none;}#yiv4984626847 dd.yiv4984626847last p a {font-family:Verdana;font-weight:700;}#yiv4984626847 dd.yiv4984626847last p span {margin-right:10px;font-family:Verdana;font-weight:700;}#yiv4984626847 dd.yiv4984626847last p span.yiv4984626847yshortcuts {margin-right:0;}#yiv4984626847 div.yiv4984626847attach-table div div a {text-decoration:none;}#yiv4984626847 div.yiv4984626847attach-table {width:400px;}#yiv4984626847 div.yiv4984626847file-title a, #yiv4984626847 div.yiv4984626847file-title a:active, #yiv4984626847 div.yiv4984626847file-title a:hover, #yiv4984626847 div.yiv4984626847file-title a:visited {text-decoration:none;}#yiv4984626847 div.yiv4984626847photo-title a, #yiv4984626847 div.yiv4984626847photo-title a:active, #yiv4984626847 div.yiv4984626847photo-title a:hover, #yiv4984626847 div.yiv4984626847photo-title a:visited {text-decoration:none;}#yiv4984626847 div#yiv4984626847ygrp-mlmsg #yiv4984626847ygrp-msg p a span.yiv4984626847yshortcuts {font-family:Verdana;font-size:10px;font-weight:normal;}#yiv4984626847 .yiv4984626847green {color:#628c2a;}#yiv4984626847 .yiv4984626847MsoNormal {margin:0 0 0 0;}#yiv4984626847 o {font-size:0;}#yiv4984626847 #yiv4984626847photos div {float:left;width:72px;}#yiv4984626847 #yiv4984626847photos div div {border:1px solid #666666;min-height:62px;overflow:hidden;width:62px;}#yiv4984626847 #yiv4984626847photos div label {color:#666666;font-size:10px;overflow:hidden;text-align:center;white-space:nowrap;width:64px;}#yiv4984626847 #yiv4984626847reco-category {font-size:77%;}#yiv4984626847 #yiv4984626847reco-desc {font-size:77%;}#yiv4984626847 .yiv4984626847replbq {margin:4px;}#yiv4984626847 #yiv4984626847ygrp-actbar div a:first-child {margin-right:2px;padding-right:5px;}#yiv4984626847 #yiv4984626847ygrp-mlmsg {font-size:13px;font-family:Arial, helvetica, clean, sans-serif;}#yiv4984626847 #yiv4984626847ygrp-mlmsg table {font-size:inherit;font:100%;}#yiv4984626847 #yiv4984626847ygrp-mlmsg select, #yiv4984626847 input, #yiv4984626847 textarea {font:99% Arial, Helvetica, clean, sans-serif;}#yiv4984626847 #yiv4984626847ygrp-mlmsg pre, #yiv4984626847 code {font:115% monospace;}#yiv4984626847 #yiv4984626847ygrp-mlmsg * {line-height:1.22em;}#yiv4984626847 #yiv4984626847ygrp-mlmsg #yiv4984626847logo {padding-bottom:10px;}#yiv4984626847 #yiv4984626847ygrp-msg p a {font-family:Verdana;}#yiv4984626847 #yiv4984626847ygrp-msg p#yiv4984626847attach-count span {color:#1E66AE;font-weight:700;}#yiv4984626847 #yiv4984626847ygrp-reco #yiv4984626847reco-head {color:#ff7900;font-weight:700;}#yiv4984626847 #yiv4984626847ygrp-reco {margin-bottom:20px;padding:0px;}#yiv4984626847 #yiv4984626847ygrp-sponsor #yiv4984626847ov li a {font-size:130%;text-decoration:none;}#yiv4984626847 #yiv4984626847ygrp-sponsor #yiv4984626847ov li {font-size:77%;list-style-type:square;padding:6px 0;}#yiv4984626847 #yiv4984626847ygrp-sponsor #yiv4984626847ov ul {margin:0;padding:0 0 0 8px;}#yiv4984626847 #yiv4984626847ygrp-text {font-family:Georgia;}#yiv4984626847 #yiv4984626847ygrp-text p {margin:0 0 1em 0;}#yiv4984626847 #yiv4984626847ygrp-text tt {font-size:120%;}#yiv4984626847 #yiv4984626847ygrp-vital ul li:last-child {border-right:none !important;}#yiv4984626847
Loading...