{"id":20581813,"url":"https://github.com/wardbenjamin/rbe3001_stm32-c","last_synced_at":"2025-09-08T23:42:11.682Z","repository":{"id":76197437,"uuid":"248394942","full_name":"WardBenjamin/RBE3001_STM32-C","owner":"WardBenjamin","description":"RBE 3001 C20 (Fichera) STM32F7 C Code: Low-level control of 3DOF arm","archived":false,"fork":false,"pushed_at":"2020-03-19T02:45:26.000Z","size":1687,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-30T06:45:35.365Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/WardBenjamin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-19T02:45:01.000Z","updated_at":"2020-03-19T02:45:44.000Z","dependencies_parsed_at":"2023-02-26T10:30:35.073Z","dependency_job_id":null,"html_url":"https://github.com/WardBenjamin/RBE3001_STM32-C","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/WardBenjamin/RBE3001_STM32-C","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WardBenjamin%2FRBE3001_STM32-C","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WardBenjamin%2FRBE3001_STM32-C/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WardBenjamin%2FRBE3001_STM32-C/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WardBenjamin%2FRBE3001_STM32-C/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WardBenjamin","download_url":"https://codeload.github.com/WardBenjamin/RBE3001_STM32-C/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WardBenjamin%2FRBE3001_STM32-C/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274231161,"owners_count":25245675,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-08T02:00:09.813Z","response_time":121,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-16T06:31:20.760Z","updated_at":"2025-09-08T23:42:11.637Z","avatar_url":"https://github.com/WardBenjamin.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RBE3001_nucleo_firmware\n\nWelcome to the first RBE3001 lab session! This is going to be great!\nBelow you will find instructions to install and set up the firmware for the nucleo-f746zg board.\n\nIf you are working on one of the workstations in AK120, then you can skip the first section of this README, and go directly to section 2.\n\n# 1. Set up udev rule (for private machines only)\n## Driver and udev rule\nThe nucleo needs a udev rule installed in\n\n/etc/udev/rules.d/81-neuronrobotics.rules\n\n```\nwget https://github.com/WPIRoboticsEngineering/RBE3001_nucleo_firmware/releases/download/0.0.6/81-neuronrobotics.rules\nsudo cp 81-neuronrobotics.rules /etc/udev/rules.d/\nsudo  udevadm control --reload-rules\nsudo adduser $USER dialout \n```\nUdev for nucleo source\n\n## Toolchains \n```\nsudo add-apt-repository ppa:team-gcc-arm-embedded/ppa\nsudo add-apt-repository ppa:webupd8team/java\nsudo apt-get update\nsudo apt install gcc-arm-embedded automake libusb-1.0-0-dev putty libhidapi-dev python-pip libtool git\nsudo pip install mbed-cli\ngit clone http://repo.or.cz/r/openocd.git\ncd openocd\n./bootstrap\n./configure --enable-stlink --enable-ftdi --enable-cmsis-dap --prefix=/usr/local\nmake -j8\nsudo make install\n\n```\n\nLog out and log back in to make the user permissions stick.\n\n\n# 2. Configure git\n## Generating a new SSH key\nIf you wish to be able to push changes to this repository without having to enter your username and password all the time,\nyou need to set up an SSH key with github. \n### 2.1 Create SSH key\nOpen Terminal\n\nPaste the text below, substituting in your GitHub email address.\n\n `$ ssh-keygen -t rsa -b 4096 -C \"your_email@example.com\"`\n \nThis creates a new ssh key, using the provided email as a label.\n\n `\u003e Generating public/private rsa key pair.`\n \nWhen you're prompted to \"Enter a file in which to save the key,\" press Enter. This accepts the default file location.\n\n `\u003e Enter a file in which to save the key (/home/you/.ssh/id_rsa): [Press enter]`\n \nAt the prompt, DO NOT type a secure passphrase, hit enter to make it passwordless.\n\n### 2.2 Add ssh key to GitHub\n\nAnd then:  https://help.github.com/articles/adding-a-new-ssh-key-to-your-github-account/\n\n### 2.3 Configure the username\n```\n$ git config --global user.name \"John Doe\"\n$ git config --global user.email johndoe@wpi.edu\n```\nTo check which other users have been configured, you can run:\n```\n$ git config --list\n ```\n\n# 3. Set up your Git Repository\n## 3.1 Clone your private lab repository\nClone your private lab repository. **Note: The command below won't work! Use your own url, found on Github!**\n```\ngit clone git@github.com:RBE300X-Lab/RBE3001_nucleo_firmwareXX.git\n```\nIf your repository is empty, you may get a warning.\n\n## 3.2 Set up your private lab repository **[DO ONLY ONCE PER TEAM]**\nNote: Perform this **only if** you do not already have the nucleo firmware in your repository\n1. `cd` into your repository you just created\n```\ncd [name of the repository you just cloned]\n```\n2. Set up a secondary remote server pointing to your repository\n```\ngit remote add default-code https://github.com/WPIRoboticsEngineering/RBE3001_nucleo_firmware.git\n```\nYou can confirm that the remote has been added by running the following command: \n```\ngit remote\n```\n3. Pull the code from your remote server. You should then see the code in your local repository\n``` bash\ngit pull default-code master\n```\n4. Push your code to your main remote repository `origin`\n```bash\ngit push origin\n```\n\n## 3.3 Pulling changes from your secondary remote repository **[Only if required]**\nIf you need to pull new changes from the default repostory, follow these instructions:\n1. Make sure you have set up the correct secondary remote repository. Run the following code to check:\n``` bash\ngit remote -v\n```\nYou should see `origin` (your main server repo) and another pointing to the following url:\n```bash\nhttps://github.com/WPIRoboticsEngineering/RBE3001_nucleo_firmware.git\n```\n**If you do not see a second remote, or your second remote points to another url, follow the instructions under [Section 3.2 Part 2](##3.2-Set-up-your-private-lab-repository-**[DO-ONLY-ONCE-PER-TEAM]**)**\n\n2. Run the following command to pull the new code from the secondary remote repository:\n``` bash\ngit pull default-code master\n```\nNote: If your secondary remote is not named `default-code`, change it to the actual name\n\n## 3.4 Ensure you have all of your submodules added and pulled\n**Note: This needs to be done every time you clone the repository**\n``` bash\ngit submodule init\ngit submodule update\n```\n\n# 4. Set up and test the firmware + toolchain\n\n## 4.1 Install the required components using pip\n``` bash\npip install --user --upgrade setuptools\n```\n\n## 4.2 Compile and Deploy the firmware\n``` bash\nmbed deploy\nmbed-cli compile -j0 -t GCC_ARM -m nucleo_f746zg --source .  --source ./mbed-os/features/unsupported/USBDevice/USBDevice/  --source ./mbed-os/features/unsupported/USBDevice/USBHID/ -f\n```\n\nIf everything worked your terminal should look like: \n\n![](/img/terminal.png)\n\nIf an error message shows up at the end of the build process, check that the board is connected to the computer and try again.\n\n# 5. Setting up Doxygen\n\n```\ndoxygen doxy.doxygen\n```\nIf successful a series of commands should scroll across the screen and once complete a docs folder should be generated comtaining an html folder.\n\n# 6. Print statements\n\nNow we are going to verify the communication between the computer and the NUCLEO firmware. To do so, we will use putty to listen on the serial port ttyACM0:\n```\nputty -serial /dev/ttyACM0\n```\nIf successful, you should now see the following:\n\n![](/img/serial.png)\n\n\n# 7 Install Eclipse CDT (for private machines only)\n\n## 7.1 Download\n[Direct Download Link for Eclipse](https://www.eclipse.org/downloads/download.php?file=/oomph/epp/oxygen/R/eclipse-inst-linux64.tar.gz)\n\n## 7.2 Install\nExtract and run the installer. Select C/C++ version of eclipse and install it in the default location. \n\n`eclipse-inst`\n\n![](/img/eclipse.png)\n\nTo launch eclipse, go to where you installed eclipse\n\nif you installed in it in the deault location run:\n\n```\ncd ~/eclipse/cpp-oxygen/eclipse\n./eclipse\n```\nOptionally you can make an eclipse launcher\n```\nmkdir -p ~/bin/\necho \"[Desktop Entry]\nVersion=1.0\nType=Application\nName=Eclipse Arm Toolchain\nComment=\nExec=$HOME/eclipse/cpp-oxygen/eclipse/eclipse\nIcon=$HOME/eclipse/cpp-oxygen/eclipse/icon.xpm\nPath=\nTerminal=false\nStartupNotify=false\" \u003e ~/bin/EclipseARM.desktop\nchmod +x ~/bin/EclipseARM.desktop\nln -s ~/bin/Eclipse.desktop ~/Desktop/EclipseARM.desktop\n```\n\n# 8. Configure your Eclipse\n\nStart by opening eclipse\n\n\n## 8.1 configure plugin\n\nCreate a workspace for you RBE3001 devlepmet. First, add the GNU ARM toolchain by clicking on the Help tab at the top of the screen and then clicking on the \"Install New Software...\" button within that tab. From there, add the following information:\n\n\nName: GNU ARM Eclipse Plug-ins\n\nLocation: `http://gnu-mcu-eclipse.netlify.com/v4-neon-updates`\n\nInstall plugins from that site. \n\n### NOTE\n \nThis step will take some time, be sure to wait for it to finish\n\nRestart Eclipse after installing plugins.\n\n\n## 8.2 Next Set up the toolchain path for MCU's\n\nWindow-\u003ePreferences-\u003eMCU-\u003eGlobal ARM Toolchain Paths-\u003eToolchain folder:\n\n`/usr/arm-none-eabi/bin/`\n\nApply and Close\n\n## 8.3 Import project\n\nSet up a new project using \"Importing to Eclipse and Building\" section from: \n\nFrom the File menu:\nImport... -\u003eC/C++ -\u003e Existing Code as Makefile Project\n\nBrowse in Existing Code Location for your RBE3001_Nucleo_firmware (This should set the project name as well\n\nSelect ARM Cross GCC\n\nFinish\n\n## 8.4 Configure Build command\n\nThen set the build command by right clicking on RBE3001_Nucleo_firmware\n\nSelect Properties-\u003eC/C++ Build\n\nBuilder Settings-\u003eBuild Command:\n\n`mbed-cli compile -j0 -t GCC_ARM -m nucleo_f746zg --source .  --source ./mbed-os/features/unsupported/USBDevice/USBDevice/  --source ./mbed-os/features/unsupported/USBDevice/USBHID/`\n\n![](/img/Screenshot_2017-08-21_12-50-00.png)\n\n\nSet the build command to push the firmware with '-f'\n\nProperties-\u003eC/C++ Build-\u003eBehavior-\u003e Build(Incremental Build)\n\nAdditionally, make sure `Buildon resource save (autobuild)` is unchecked\n\n![](/img/Screenshot_2017-08-21_12-43-41.png)\n\n## 8.5 Fix Compilation path\n\nright click on RBE3001_Nucleo_firmware \n\nProperties-\u003eC/C++ Build -\u003eSettings-\u003eToolchains-\u003eToolchain path\n\nand make sure it says:\n\n`/usr/arm-none-eabi/bin/`\n\nClick apply and Save from this window. This writes the toolchain into the configuration and causes a re-index. THis step is nessissary. \n\nright click on RBE3001_Nucleo_firmware\n\nIndex-\u003e Rebuild\n\nWait for the C/C++ indexer to complete and then you can begin working.\n\n## 8.6 Click the green run button\n\nThe green button with hte white play symbol to compile and program the robot.\n\n**Congratulations! You have completed the setup of the NUCLEO firmware!**\n\n\n# 9. Core firmware maintainance and bug reporting\n## 9.1 Upstream updates\nIf the course staff needs to update or repair any system code or the dependant libraries, then you will need to run:\n```\ngit pull RBE-UPSTREAM master\ngit submodule init\ngit submodule update\ncd lib/AS5050/\ngit pull origin master\ncd ..\ncd lib/MbedPwmServo/\ngit pull origin master\ncd ..\ncd lib/PID_Bowler/\ngit pull origin master\ncd ..\ncd lib/SimplePacketComs/\ngit pull origin master\ncd ..\n```\n\n## 9.2 Reporting Issues with the template code\n\nTo report an issue with the template code it must consist of these exact elements:\n\nA public fork of the template code from the current master with the error demonstrated with a unit test demonstration. Only the necessary code to demonstrate the bug. 9 times out of 10, when doing this you will find the bug or a faster workaround to unexpected behavior. If the bug can be demonstrated in isolation then move on to the next step. DO Not just copy your whole project over, make a new set of code demonstrating only the problem and nothing else. Each line must have a comment on the end explaining why it needs to be ther in order to demonstrate the bug. This will be visible in the github diff as each line having a comment after the end of the line. If you demonstration does not meet these criteria, the issue will wait until you commit updates making the repo meet them. \n\nAn Issue posted here: https://github.com/WPIRoboticsEngineering/RBE3001_nucleo_firmware/issues and a link to the repository with the demonstration code. Simply describing a problem without the isolated demonstration code will cause the issue to be closed. The issue will be reviewed and a patch or response with happen as soon as the staff figures out whats wrong. If you would like to suggest a solution, feel free to send a Pull Request with a clean branch of the solution to the issue. Be sure to include the issue number, such as #1 , in all commits resolving this issue. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwardbenjamin%2Frbe3001_stm32-c","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwardbenjamin%2Frbe3001_stm32-c","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwardbenjamin%2Frbe3001_stm32-c/lists"}