This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Few beginner questions - from AVR to ARM

hi,

after some time i think its time to learn arm programming, i used to program for avr, (im mainly a pc programmer ! young one )

i got an Raspberry pi model b+. but i don't want to use it for making fun stuff or hobby, i want to do real programming(not that python and pi are not real programming i can't explain what i mean) , so i can work somewhere(i don't want to but example of what i mean, im not looking to make stuff, im looking to learn!!!) or make products! (like nest self learning thermostat or the Parrot ar.drone)

raspberry pi has an os and its a big boards and has unneeded stuff so i don't want to use it on my final product (release it with a pi inside of it!)

like in avr i wrote my c program for my chip on breadboard, or an arduino, after that i just installed the final version into  a chip ans inserted it into a final cricut , but not the whole arduino! (like lets say i made an automatic cat feeder and released it for public!!! )

i want to do the same, so my question is:

how can i start it? Do i need to know Assembly?  i only know a little bit of PC assembly, it sounds cool


i heard different MPU/MCU's require learning the whole thing again, i may use different stuff on different projects, that means i have to learn it again for each project?!

lets say my goal is to make AR.Drone from scratch, by buying motors the chips and ect, but i want to prototype it with pi first, and the OS and other stuff just require battery and waste resources , how can i do it?!

so what should i do/learn to make an AR.Drone?! (i know its not like i wake up and decide to build a time travel machine but i will learn what's necessary because i have time and im looking to learn !)

sorry if this question sounds stupid but i have been really confused these days so i thought its good to make a thread!

EDIT:

let me summirize it a little !

Summary:

im moving from AVR programming to ARM,

what steps i should take? what should i learn?

i want to use ARM for making products and devices , i already bought an pi to prototype before i can make it a product , in its own board with other stuff in the board

a good example of what i want is ar.drone !

  • if my question is bad or hard to read, i can rewrite it !!!

  • Hello and welcome kamhagh

    I'm not sure I understand the meaning of your question, but on the Raspberry Pi you can install the Raspbian OS and use all your tools python, C ++ ...
    may i could help you ? Are you familiar with using linux (Debian) ?

  • I know how to use linux but my problem is i dont want Pi's help, why? Because pi software slows down the stuff and also is only for an spicific board, i want to programm MPUs and build my own boards, and if i use pi its big and has unwanted features and stuff!

    Pi progtamming is like pc programming! Mostly!

  • I have the same probleme with my beaglebone. But it's easy to reduce the cpu/memory usage by removing or desactivating some init's deamon. My beaglebone working well now with mysql+apache with less 180Mo of Ram. I think you could remove all the X componants for start.

    After you could make more by adjusting the linux kernel.

  • There's various Raspberry Pi groups learning about using it and making various things with it. I'd have thought they would be best for what you want. As to making something on the scale of the ar drone probably the eventual sort of thing you'd want to use would be an ARM Cortex M0 to M4 type chip with less than a megabyte of memory and running an RTOS without memory management rather than Linux. There's lots of cheap development boards for them so you'll want to look into that, but the Raspberry Pi and its user groups though is better for starting to program ARM's and get some sort of thing working.

  • @daith For sure  there's other way to do that without using Linux, in particular if he want to create his own board. But for sure also, the linux enviromnent give him the largest help than other. It's my own thinking. For me linux is the kernel, not the way to distribute it. The slackware users 2.2 or less will understand what i say 32Mo is enough to make work linux

  • but still i want to make my own cricuts !!

  • so i will use linux, if i can still make my own boards !

    but the problem is i still don't why pi's libraries and other stuff, i want to program the bare MCU with my own board, make it, install linux on it, flash my  code there, and let it run !!

  • my main problem with Pi is that the software i make for it is only for the Pi board, i want to be able to create a board with my desired components ! i feel like the pi is more of a computer ! i want to use ARM as components like MCU(when AVR mcu's don't have enough power! and doesn't meet my needs) , maybe in my project i dont even need video at all!!


    like with AVR, or even arduino, i could flash arduino bootleder on many of AVR MCU's and make my programm run on it and forget about the board and insert my AVR MCU on a cricut !


    if that needs me to learn asm i will do that ! but if there's easier way i would gladly do that i just hate the fact that i have to learn the whole thing again for other ARM Contexes !


    sorry i can't explain good


    and also i saw that ar.drone uses linux !

  • im so confused   just forget about first one and answer this using Linux sounds like a lot of help, and it seems like i can install Linux on any Cortex, and the programs only work on pi, i want to be able to create my cost effective boards with different Cortex rather than Pi's current one or maybe more powerful ones ! ( i see there are many different Cortexes !)

    pi looks like more of an mini computer to me now !

  • What do you not use an existing board without display output ?

    like the Arduino Due based on ARM cortex M3 for exemple in your case.

    I don't know exactly what you project, but it could be suffisant ?

  • I'm not understand when you say your program only works with pi ? What is it so specific that create this malfunction on other board ?

  • thats an example, but still lets say i work for an company, big one like parrot they just can't use an arduino on they're ar.drone or anything, also these boards are big, i mostly want to learn, i don't have specific projects, i want to learn the skill of programming arm MPU's for different devices or stuff!

  • the python program

    import RPi.GPIO as GPIO

    GPIO.setup(GPIO.BCM)

    GPIO.setmode(GPIO.OUTPUT);

    ect

    wont work on my custom board with an different ARM right? not the Pi's Cortex but different model !

    also my main problem with Pi is the size and price ! creating my own boards with desired Ram and MPU and storage for program is cheaper and smaller !

    if the ar.drone didn't exist now and i was hired by parrot (ofc im not ) it wouldn't work good with a pi !

    a company can't just simply use a board like pi in they're product even if they could!

    i know its a lot easier with Pi, but i can work harder

    in both nest thermostat and Ar.drone neither use pi and both have their own custom designed boards!

    i want to learn programming arm from now for future ! because i find it useful, and maybe i will study electronics

    sorry if im annoying you

    I want to make my own embedded system board !

  • I think what you're saying is that you want a microcontroller, which has both flash-memory and SRAM built-in.

    And you do not want a horribly lot of other semiconductors / components.

    If that is the case, it might be the easist for you to use a Cortex-M3 or Cortex-M4 (like daith says).

    If you require a lot of heavy calculations or very high speed, you may want to look for a Cortex-M4.

    You'll easily be able to find Cortex-M3 running at 50 MHz, 72 MHz, 100 MHz or 120MHz.

    Many Cortex-M4 runs at 50 MHz, 100 MHz, 168 MHz, 180 MHz and 204 MHz.

    I've seen Cortex-M0+ running up to 48 MHz.

    Cortex-M0 is usually good for energy-saving, however, a Cortex-M3 or Cortex-M4 does not use extremely much energy.

    Compared from what you know, the AVR, a Cortex-M device is definitely both faster and gives better possibilities.

    It also enables you to change more than 8 GPIO-pins at a time.

    The most 'difficult' thing to learn about the ARM-based microcontrollers, is that you need to turn on power to the peripherals you want to use.

    On some devices, you also need to place a (usually pull-up) resistor on a boot-pin (and avoid that this pin is pulled low during reset).

    You can download the tools you need for free.

    Normally, those tools will allow you to program in C, C++ or Assembler.

    Some of the tools might give you more options.

    I'm usually buying adapter-PCBs (such as LQFP144 adapter PCBs, and a Cortex-M3 or Cortex-M4 chip.

    I then solder the chip onto the adapter PCB and add a few pin-headers.

    I make sure that I solder the pin headers so the adapter PCB can be inserted into my solderless breadboard.

    From there and forward, it's easy building your design, as long as you remember 100nF capacitors from each VCC line to GND.

    If you decide to take the route I use, you will need a JTAG-adapter or if you have a Windows-based computer, you can often just use the serial port for flash-programming the Cortex-M.

    You will need to verify this in the specific microcontroller's datasheet, though. Nowadays, many devices also allow you to flash-program them via USB.

    The question now is which microcontroller that fits your needs.

    Depending on where you live, you might be able to find some at Farnell for instance.

    Ff you click the link, you will see I've sorted Cortex-M microcontrollers by price.

    Click on the PDF icon under the picture of the device, in order to get the datasheet.

    Note: There's no guarantee that the picture of the device is correct.

    In the column named "Architecture", you can see if it's a Cortex-M0, Cortex-M3 or Cortex-M4.

    You will need to scroll down / go to next page, in order to find Cortex-M3 and Cortex-M4 devices.

    If you need to use the microcontroller for motor-control, then you may want to take a look at LPC1549.

    NXP has an evaluation board for this device, which you might find interesting.

    The special thing about the LPC15xx is that it has a lot of PWM channels, so it's particularly good for controlling motors.

    Though I am very fond of NXP, there are many other devices that you might find interesting.

    Nordic Semiconductor and Freescale both makes  ARM Cortex-M microcontrollers that have wireless features.