Skip to content

Commit

Permalink
v0.1.6
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Richard Bariampa committed Nov 28, 2020
1 parent de05113 commit 9e924ef
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 7 deletions.
44 changes: 38 additions & 6 deletions Make me a Makefile.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ""
Expand All @@ -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"
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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`"))
Expand Down Expand Up @@ -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
{
Expand Down
26 changes: 25 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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.

0 comments on commit 9e924ef

Please sign in to comment.