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
@ahmedwahdan
ahmedwahdan / GreenGrass_With_OTA
Created October 2, 2019 06:20
GreenGrass_With_OTA
/*
* Amazon FreeRTOS V201906.00 Major
* Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
/* 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>
@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;
}
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
https://youtu.be/2JqWvl3HFfQ
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
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

linux commands used for daily bases development