From 9e924ef5b8f73228551481274026ac1ebe70db76 Mon Sep 17 00:00:00 2001 From: Richard Bariampa Date: Sat, 28 Nov 2020 23:42:57 +0200 Subject: [PATCH] v0.1.6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Introductions: 🟢 Introduced README file content. 🟢 MAM now outputs an empty source file. Changes: 🔵 Fixed Teensy 4.1 misindexed number. 🔵 Fixed Teensy 3.2 Wrong BoardName and BoardID. 🔵 Fixed DateTime in rtc_localtime bug. Known issues: 🔴 If lib and core are left empty they will cause a make error. Future improvements: 🟡 Add support to choose your compiler. 🟡 Add support x86 and AVR. --- Make me a Makefile.ps1 | 44 ++++++++++++++++++++++++++++++++++++------ README.md | 26 ++++++++++++++++++++++++- 2 files changed, 63 insertions(+), 7 deletions(-) diff --git a/Make me a Makefile.ps1 b/Make me a Makefile.ps1 index ed1158e..4895074 100644 --- a/Make me a Makefile.ps1 +++ b/Make me a Makefile.ps1 @@ -105,8 +105,8 @@ Write-Host "Select board. 3) Teensy 3.5 4) Teensy 3.6 5) Teensy 4.0 -5) Teensy 4.1 -6) Other +6) Teensy 4.1 +7) Other " $BoardNumber = "" @@ -119,8 +119,8 @@ $BoardNumber = $BoardNumber -as [int] switch ($BoardNumber) { 1 { - $BoardName = "Teensy 3.2" - $BoardID = "TEENSY32" + $BoardName = "Teensy 3.1" + $BoardID = "TEENSY33" $BoardProcessor = "mk20dx256" $CPUType = "cortex-m4" $CPUSpeed = "72000000" @@ -299,7 +299,7 @@ FLAGS_LSP := FLAGS_CPP := -fno-exceptions -fpermissive -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti FLAGS_C := FLAGS_S := -x assembler-with-cpp -FLAGS_LD := -Wl,--print-memory-usage,--gc-sections,--relax,--defsym=__rtc_localtime=`$(shell powershell [int](Get-Date -UFormat +%s)[0]) -T`$(CORE_BASE)/$BoardProcessor.ld +FLAGS_LD := -Wl,--print-memory-usage,--gc-sections,--relax,--defsym=__rtc_localtime=`$(DateTime) -T`$(CORE_BASE)/$BoardProcessor.ld LIBS := -larm_cortexM4lf_math -lm -lstdc++ DEFINES := $Defines @@ -376,7 +376,7 @@ INCLUDE += `$(foreach d, `$(LIB_DIRS), -I`$d) #------------------------------------------------------------------------------------------------------------------------------------------------- # Creation of Directories #------------------------------------------------------------------------------------------------------------------------------------------------- -DIRECTORIES := `$(sort `$(dir `$(CORE_OBJ) `$(SRC_OBJ) `$(LIB_OBJ))) +DIRECTORIES := `$(sort `$(dir `$(CORE_OBJ) `$(SRC_OBJ) `$(LIB_OBJ))) generateDirs := `$(foreach d, `$(DIRECTORIES), `$(shell if not exist `"`$d`" mkdir `"`$d`")) @@ -480,6 +480,38 @@ Write-Progress -Id 1 -Activity Updating -Status 'Creating Makefile' -PercentComp try { Set-Content -Path "Makefile" -Value $OutputString + New-Item -ItemType Directory -Force -Path "include" + New-Item -ItemType Directory -Force -Path "src" + Set-Content -Path "include/main.hpp" -Value "//------------------------------------------------------------------------------------------------------------------------------------------------- +// Generated by Make me a Makefile (https://github.com/Orion-CanSat/Make-me-a-Makefile) +// +// Board: $BoardName +// CPU Speed: $CPUSpeed +// Optimization: $Optimization +// +// Time of creation: $Date +//------------------------------------------------------------------------------------------------------------------------------------------------- + +extern `"C`" int main(void); +" + + Set-Content -Path "src/main.cpp" -Value "//------------------------------------------------------------------------------------------------------------------------------------------------- +// Generated by Make me a Makefile (https://github.com/Orion-CanSat/Make-me-a-Makefile) +// +// Board: $BoardName +// CPU Speed: $CPUSpeed +// Optimization: $Optimization +// +// Time of creation: $Date +//------------------------------------------------------------------------------------------------------------------------------------------------- + +#include `"main.hpp`" + +int main(void) +{ + +} +" } catch { diff --git a/README.md b/README.md index 2670ff3..81796d0 100644 --- a/README.md +++ b/README.md @@ -1 +1,25 @@ -Make me a Makefile +# Make me a Makefile +## What is Make me a Makefile? +Make me a Makefile (MAM) is a script written in PowerShell, that allows you to create a custom GNU Makefile for your embedded project. + +  +## Why use Make me a Makefile? +MAM is a free and open source cross platform solution that is capable of supporting many different architectures and proccesors. In addition, it is capable to make you a makefile for your regular project. And last but not least, it is even capable of compiling your own custom kernel. We are constantly working on adding more features, processor types, pre-made boards and architectures. + +  +## Architectures and pre-made boards we support and will support +### Architectures +- [x] ARM +- [ ] AVR +- [ ] x86 + +  +### Pre-made boards +- [x] Teeny 3.1, 3.2, 3.5, 3.6, 4.0, 4.1 +- [ ] Teensy LC +- [ ] Arduino UNO, Nano, Mega +- [ ] ESP + + +## What if my platform is not supported, I don't use a pre-made board or my board is not supported? +You can still use our script but, you will have to provide some info about your board. You can also add an issue in our repository and ask for your pre-made board or architecture to be added. \ No newline at end of file