[SOLVED] SD card not visible on Omega2+



  • Hi,

    I have just started working with Omega2+ and the first thing I want to do is to boot from SD card, because I want to use the gcc and g++ compilers and Omega does not have enough memory. However the SD card is not visible at all.

    root@Omega-B536:/tmp# df
    Filesystem           1K-blocks      Used Available Use% Mounted on                                                             
    /dev/root                 7936      7936         0 100% /rom                                                                   
    tmpfs                    62404       240     62164   0% /tmp                                                                   
    /dev/mtdblock6           22592      8428     14164  37% /overlay                                                               
    overlayfs:/overlay       22592      8428     14164  37% /                                                                      
    tmpfs                      512         0       512   0% /dev                                                                   
    /dev/mtdblock7             512       196       316  38% /mnt/mtdblock7
    
    

    I read this:
    https://community.onion.io/topic/2154/sd-card-needs-to-be-re-plugged-on-reboot
    but in my case the SD card cannot be seen either after reboot or after I remove and plug the card back in.

    /mnt looks like this:

    root@Omega-B536:/mnt# ls                                                                                                       
    mtdblock7  
    

    /dev looks like this:

    root@Omega-B536:/dev# ls                                                                                                                                            autofs              mtd0ro              mtdblock1           snd                 tty20               tty35               tty5                tty7                    bus                 mtd1                mtdblock2           spidev0.1           tty21               tty36               tty50               tty8                    console             mtd1ro              mtdblock3           tty                 tty22               tty37               tty51               tty9                    cpu_dma_latency     mtd2                mtdblock4           tty0                tty23               tty38               tty52               ttyS0                   full                mtd2ro              mtdblock5           tty1                tty24               tty39               tty53               ttyS1                   gpiochip0           mtd3                mtdblock6           tty10               tty25               tty4                tty54               ttyS2                   gpiochip1           mtd3ro              mtdblock7           tty11               tty26               tty40               tty55               uinput                  gpiochip2           mtd4                network_latency     tty12               tty27               tty41               tty56               urandom                 i2c-0               mtd4ro              network_throughput  tty13               tty28               tty42               tty57               vcs                     kmem                mtd5                null                tty14               tty29               tty43               tty58               vcs1                    kmsg                mtd5ro              port                tty15               tty3                tty44               tty59               vcsa                    ledchain2           mtd6                ppp                 tty16               tty30               tty45               tty6                vcsa1                   log                 mtd6ro              ptmx                tty17               tty31               tty46               tty60               watchdog                mem                 mtd7                pts                 tty18               tty32               tty47               tty61               watchdog0               memory_bandwidth    mtd7ro              random              tty19               tty33               tty48               tty62               zero                    mtd0                mtdblock0           shm                 tty2                tty34               tty49               tty63
    

    But there is no trace of a 'mmc*' /SD.

    I have tried two different SD cards hoping that the problem is the card itself, but nothing changed.
    My firmware version is b233.

    Could someone please help me with this?



  • @Cristian-Bourceanu may I ask why you want to compile on the Omega? It will drive you nuts, why not just cross compile?



  • @crispyoz I didn't know about cross compile. I had just started using Omega, so I am still learning about it.
    Thx for your suggestion!
    However, I would still like to make the micro SD card useable for future needs.



  • @Cristian-Bourceanu Booting from SD Card is different from using the SD Card. The reason I suggest cross compiling is because you need to consider that the Omega is designed for IoT types of applications so resources are limited. Instead you can develop your apps on your PC under windows/Linux etc with all the features and power that provides, then deploy your app to your Omega. You can even do remote debugging if you need to.

    Take a look at cross compiling in the docs (https://docs.onion.io/omega2-docs/cross-compiling.html), the setup is pretty straight forward and many people seem to use the prebuilt docker image available on Onion github (https://github.com/OnionIoT) I'm not personally a fan of using the Docker image or Docker in general but that's a flame war for a later date. I prefer to develop on I linux machine using the Onion source repository as a starting point. (https://github.com/OnionIoT/source)

    Regarding the SD Card, assuming you boot as normal you can insert the SDCard and it should automount so you run df to see the mount point.



  • @crispyoz I will follow your advise about cross compiling. Remote debugging sounds very satisfying and can't wait to learn about it.

    The SD card did not automount and that was my problem in the first place. I have even factory reset it, but nothing changed. I kind of use all the peripherals(GPIOs) available on the omega, but that shouldn't interfere with the SD unless there are some common connections, but I couldn't confirm that since I didn't find any schematic for Omega2+.



  • @Cristian-Bourceanu which Omega model are you using? Omega2/2+/S/S+/Pro



  • @crispyoz Omega2+
    I have designed my own PCB that I connect Omega2+ to. You can check that out here: https://github.com/cristi-bourceanu/Omega2P_FruitingChamber.git



  • Update!

    I have disconnected the Omega from the board that I have designed and powered it up separately and now the SD card is discoverable. Thus, something from my PCB is definitely interfering with the SD card. Does anyone have a clue what could be the cause of it?



  • @Cristian-Bourceanu I found my issues with sdcard were due to bad or non-existent gnd on pin 7 of the sdcard slot. Might be worth checking.



  • Solved!
    My Omega was controlling some outputs with the help of some transistors. The resistors between Omega and the base of transistors were all 1kohm, which might have been too low for Omega capabilities of 4 mA per GPIO. I replaced all of them with 4k7 and it is now working.

    I don't even know why I have used such low resitances. I guess I was thinking that if I am not low on power, then why not.


Log in to reply
 

Looks like your connection to Community was lost, please wait while we try to reconnect.