Skip to content

robotronik/cdfr2020BaseRoulanteRework

Repository files navigation

cdfr2020BaseRoulanteRework

Code for the robotronik club participation to the french robotics cup (WIP). This code will implement motor control and positioning awareness by odometry.

Reminder: To clone the submodule in the same time, use git clone --recurse-submodules, then don't forget to build libopencm3. You need to execute make install_udev one time to add the permission to flash. If you forgot to clone with submodule just run git submodule update --init --recursive

To compile and flash you need gcc-arm-none-eabi-bin, st-linkand openocd

To build: mainTest.elf To flash: mainTest.flash To clean: make clean

Software documentation

You can access the documentation generated from the code with doxygen (see the doxygen paragraph to generate it) in the doxygen/html or latex.

Hardware documentation

Microcontroller used: STM32F303K8 on a Nulceo-32 board, main doc:

Doxygen

Generating the documentation with doxygen: --> install doxygen on your system

--> run doxygen doxygenConf from the project directory

--> the documentation can then be read from doxygen/html/index.html in a browser

--> to generate the pdf for the github (or for yourself !) go into the latex directory cd doxygen/latex and run make.

Note: You must have a latex distribution on your computer that has pdflatex command.

Generate the database for your IDE

--> to update the compile_command.json you can use bear (available in the AUR) --> run make clean --> run bear /compilation command/

Debug with uart

--> install picocom --> find your card ls /dev . It should be /dev/ttyACM0 --> run picocom with picocom -b 9600 /dev/ttyACM0

Coding style

  • Tabs are spaces = 4

  • Column = 80

  • Brackets :

    def peripheral_action_subjectofaction(params){
        code...
        some more code...
    }
    
  • Function naming

    • _ is the separator
    • peripheral_action_subjectofaction
    • function starting with _ are private and should not be called in high level code
  • Variables

    • my_var
  • Documentation using doxygen

    • comment the function interface in the .h files (javadoc like)
    • detail the function in .c files
  • We envision three levels for the code :

    • lowlevel fuctions that must be as general as possible to setup the hardware config (ex: timer fuctions)
    • lowlevel modules with the functions called by the user (ex: motor module, with setup and speed/dir fuctions)
    • rolling unit level (ex: control engineering)

About

code de la base roulante pour la participation de robotronik a la coupe de france 2020 (WIP)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors