Skip to content

Instantly share code, notes, and snippets.

View ahmedwahdan's full-sized avatar
💭
Self-Driving car nano degree

ahmed wahdan ahmedwahdan

💭
Self-Driving car nano degree
View GitHub Profile

Modern CPP best practise, examples, Do and Don't

linux commands used for daily bases development

Create IAM User (This is uses instead of using the ROOT User)
1- Search and navigate to IAM page
2- Choose User then Add User
3- Select the name "My_OTA_User" for example
4- For access type Select whatever you like (we can use Paragmmatic access)
5- Select attach existence policy and search for and select the following
- AmazonFreeRTOSFullAccess
- AmazonFreeRTOSOTAUpdate
- AWSIoTFullAccess
6- Select Create User and download the credentials CSV file
sudo apt-get install automake bison chrpath flex g++ git gperf gawk\
libexpat1-dev libncurses5-dev libsdl1.2-dev libtool python2.7-dev texinfo\
help2man libtool libtool-bin libtool-doc
https://youtu.be/2JqWvl3HFfQ
Using the latest BFG jar file
https://rtyley.github.io/bfg-repo-cleaner/
https://github.com/rtyley/bfg-repo-cleaner
1- Clean large files size
java -jar bfg-1.13.0.jar -b <size> <repo>
2- Rewrite history
from the repo folder
git reflog expire --expire=now --all && git gc --prune=now --aggressive
@ahmedwahdan
ahmedwahdan / main.c
Created November 6, 2020 13:42
noinit RAM GCC example
uint32_t reset_cnt __attribute__ ((section (".noinit")));
uint32_t first_run __attribute__ ((section (".noinit")));
void main(void)
{
if(first_run != 0xDEADBEEFUL)
{
reset_cnt = 0;
first_run = 0xDEADBEEFUL;
}
/* USER CODE BEGIN Header */
/**
******************************************************************************
* File Name : mbedtls_config.h
* Description : the mbedtls custom config header file.
******************************************************************************
* @attention
*
* <h2><center>&copy; Copyright (c) 2020 STMicroelectronics.
* All rights reserved.</center></h2>