9 Replies Latest reply on Mar 26, 2015 4:40 PM by Paul Bearne

    Intel Edison and low level programming

    captainwalnut94

      Hello everyone! I'm studying computing engineering in Spain and I have some doubts about the new Intel Edison.

      I have to do a project about anything using a SoC but without high-level programming. In our labs we use a freescale KL25Z, but I would like to use an Intel Edison to do it (maybe an Arduino Breakout Kit would do the trick).

      Firstly, I have to get an schematic (I think it's that: http://download.intel.com/support/edison/sb/mini_edison_breakout_hvm_8_26.pdf) and a hardware guide to learn about its pin usage (http://download.intel.com/support/edison/sb/edisonbreakout_hg_331190006.pdf, maybe this?).

      Secondly, I will need some help from you to achieve bare-metal programming. For example, we did a C program to blink a LED, we had to address a pointer to a particular pin and then modified its value to do it, but I've been researching about how to do it on an Edison and I've only found high-level programs, is there a way to do it like we did with the KL25Z?

      And finally, is there a way to use Eclipse IDE C/C++ without having another Eclipse IDE for an Intel Edison? (I'm using Fedora 21, if it's helpful).

       

      I hope you have understood me, my english it's pretty bad and Google Translator it's not my best friend.

      Very grateful for your help!

        • 1. Re: Intel Edison and low level programming
          CMata_Intel

          Hi captainwalnut94

           

          If you want to use the Edison with the Arduino Expansion board, you have to use the next documentation:

          Hardware Guide

          Schematic

          Hardware Guide of the Compute Module

           

          About your second question, have you tried to create a C-code or a bash script to interact with the GPIO.

          You can use mraa and C programming like this example

          Or you can create a script using indications like the ones in Section 11 from the Hardware Guide

           

          Is this helpful or do you need an application at a lower level than this?

           

          Regards;

          CMata

          1 of 1 people found this helpful
          • 2. Re: Intel Edison and low level programming
            captainwalnut94

            Thanks for the reply CMata_Intel! I will ask to my teacher if it's correct enough, but I think it stills being too high-level coding.

            This is the code we used to blink the LED at the _freedom KL25Z_:

                 // Configurating PORTB's _clock gating_ using a defined bit-mask.

                 SIM_BASE_PTR->SCGC5 |= SIM_SCGC5_PORTB_MASK;

                 // Setting PCR's multiplexor to address the pointer at LED's pin.

                 PORTB_BASE_PTR->PCR[18] = PORT_PCR_MUX(1);

                 // Using an OR to enable 18th bit of PDDR.

                 PTB_BASE_PTR->PDDR |= 1 << 18;

             

            A few moments ago, my teacher gave us a manual to use _bare metal_ with an Arduino. We should use a library called "AVR" to program the MCU and Arduino's IDE. Any advice?

            • 3. Re: Intel Edison and low level programming
              Paul Bearne

              The AVR library that your teacher is talking about is specific to the Atmel AVR series of Microcontroller which are used on the arduino UNO and DUO boards to allow access to the Io pins. this is the similar to the mraa library which is the Edison equivalent in the eclipse environment  . Is your teacher wanting to use the Atmel AVR? I would suggest that you show him the user guide for the Edison  to see if it is ok to use. if it is show him the programming options you have available C , bash , node or Arduino to allow you make the correct choice.

              • 4. Re: Intel Edison and low level programming
                captainwalnut94

                Hi beano04! I appreciate your answer, could you talk me more about this mraa library? Maybe it would be useful for my project and my teacher could let me use it if it's low-level enough. Any examples about how to use it? Tutorials? Anything that could help me to learn how to use it?

                • 5. Re: Intel Edison and low level programming
                  Yodal

                  mraa is a library for interacting with various features in embedded linux systems. It is almost a necessity for GPIO, SPI, I2C, etc. on the Edison. The documentation for mraa can be found here and the github can be found here. mraa abstracts the low level stuff away so that is works the same on many platforms so it probably won't be low enough for your professor. In fact, most programming for the Edison if you are still working with linux will most likely not be low level enough for your professor as it sounds like you are learning about how to program embedded microprocessors.

                   

                  Now, I think you really should not be looking at the Edison for your school project. I believe to do bare metal programming on the Edison would be difficult at best because of the limited documentation out about what exactly is in the Edison and how it all connects. I would suggest sticking with the KL25Z or an AVR based Arduino for your school project and learning more about programming for the Edison in a linux environment in your own time.

                  • 6. Re: Intel Edison and low level programming
                    Paul Bearne

                    I totally agree with yodal that the Edison is not the best device for a school project with its lack of low level documentation. Your teacher would probably want you to be looking at the micro-controllers data-sheet for information on how to bit mask the port IO pins etc and all this information is lacking for the Edison. for the purposes of your school project i would suggest looking at the Arduino Uno board Atmel AVR based which is what your teacher wants and as yodal says it will give you a better understanding of programming embedded system and the design processes involved.

                    • 7. Re: Intel Edison and low level programming
                      captainwalnut94

                      Thank you Yodal and beano04 for the information, I did the project's presentation a few minutes ago and I can asure we will do it with the freedom KL25Z, but I already acquired an Intel Edison for my own projects.

                      My teacher asked if its inputs are able to be connected directly without welding. How does it connects?

                       

                      My apologies for the inconveniences, maybe after doing this project I will start "touching" this SoC on a highest level with my ideas.

                      Again, thanks to everyone for the answers!

                      • 8. Re: Intel Edison and low level programming
                        captainwalnut94

                        Wow! My teacher allowed me to use the Intel Edison if I program it at lower level as possible using MRAA library, awesome!

                        Thanks to everyone for your answers!

                        • 9. Re: Intel Edison and low level programming
                          Paul Bearne

                          That's good news. Let us know if you require any more assistance and good luck with your project.