Skip to content

Commit

Permalink
Merge pull request #14 from imahjoub/6-support-ek-tm4c123gxl-board
Browse files Browse the repository at this point in the history
support tm4c123gxl-board in UBM
  • Loading branch information
imahjoub authored Nov 20, 2024
2 parents 49c40b3 + 17e1f9c commit bcab1d7
Show file tree
Hide file tree
Showing 29 changed files with 15,429 additions and 18 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/UniversalBareMetal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
- '**'
pull_request:
jobs:
target-ubuntu:
target-ubuntu-stm32f446re:
runs-on: ubuntu-latest
defaults:
run:
Expand All @@ -33,7 +33,7 @@ jobs:
make -f ../Make/make_000.gmk ${{ matrix.suite }} TYP_OS=unix TYP_MCU=stm32f446re
ls -la ../Bin/stm32f446re_x64/stm32f446re.elf ../Bin/stm32f446re_x64/stm32f446re.hex
msvc-msbuild:
msvc-msbuild-stm32f446re:
runs-on: windows-latest
strategy:
fail-fast: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/UniversalBareMetal_CodeQl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:

jobs:
analyze:
name: Analyze
name: Analyze target stm32f446re
runs-on: ubuntu-latest
permissions:
actions: read
Expand Down
5 changes: 5 additions & 0 deletions Build/Make/make_000.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,8 @@ ifeq ($(TYP_MCU),stm32l432kc)
include $(PATH_SRC)/Target/stm32l432kc/Make/make_stm32l432kc.gmk
endif

ifeq ($(TYP_MCU),tm4c123gxl)
include $(PATH_SRC)/Target/tm4c123gxl/Make/make_tm4c123gxl.gmk
endif


3 changes: 3 additions & 0 deletions Build/VS/UniversalBareMetal.sln
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Global
Release|x64 = Release|x64
stm32f446re|x64 = stm32f446re|x64
stm32l432kc|x64 = stm32l432kc|x64
tm4c123gxl|x64 = tm4c123gxl|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{32D529D9-6963-472C-9BB3-1E4E1933FC56}.Debug|x64.ActiveCfg = Debug|x64
Expand All @@ -44,6 +45,8 @@ Global
{32D529D9-6963-472C-9BB3-1E4E1933FC56}.stm32f446re|x64.Build.0 = stm32f446re|x64
{32D529D9-6963-472C-9BB3-1E4E1933FC56}.stm32l432kc|x64.ActiveCfg = stm32l432kc|x64
{32D529D9-6963-472C-9BB3-1E4E1933FC56}.stm32l432kc|x64.Build.0 = stm32l432kc|x64
{32D529D9-6963-472C-9BB3-1E4E1933FC56}.tm4c123gxl|x64.ActiveCfg = tm4c123gxl|x64
{32D529D9-6963-472C-9BB3-1E4E1933FC56}.tm4c123gxl|x64.Build.0 = tm4c123gxl|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
131 changes: 128 additions & 3 deletions Build/VS/UniversalBareMetal.vcxproj

Large diffs are not rendered by default.

69 changes: 66 additions & 3 deletions Build/VS/UniversalBareMetal.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,21 @@
<Filter Include="Source Files\Src\Target\stm32l432kc\OS">
<UniqueIdentifier>{da74b66b-3426-400e-a8b0-e21cea469bcc}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\Src\Target\tm4c123gxl">
<UniqueIdentifier>{5134c5ab-f425-47f1-8eb8-bc034523e01d}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\Src\Target\tm4c123gxl\Make">
<UniqueIdentifier>{2f6b69a5-e243-4c69-b84c-cba61715dd27}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\Src\Target\tm4c123gxl\Mcal">
<UniqueIdentifier>{d4440770-cbfe-43e7-9c83-eb45ee9d49fc}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\Src\Target\tm4c123gxl\Startup">
<UniqueIdentifier>{c80246d7-e040-4247-a3a7-3f51578454ec}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\Src\Target\tm4c123gxl\OS">
<UniqueIdentifier>{76a84d68-da22-4b40-a85c-7ca0ae4d6c81}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\Src\target\stm32f446re\startup\crt0.cpp">
Expand Down Expand Up @@ -124,12 +139,33 @@
<ClCompile Include="..\..\Src\App\C\App.c">
<Filter>Source Files\Src\App\C</Filter>
</ClCompile>
<ClCompile Include="..\..\Src\App\C\OS\OS_Task.c">
<Filter>Source Files\Src\App\C\OS</Filter>
</ClCompile>
<ClCompile Include="..\..\Src\Target\stm32l432kc\OS\OS.c">
<Filter>Source Files\Src\Target\stm32l432kc\OS</Filter>
</ClCompile>
<ClCompile Include="..\..\Src\Target\tm4c123gxl\Mcal\Gpt.c">
<Filter>Source Files\Src\Target\tm4c123gxl\Mcal</Filter>
</ClCompile>
<ClCompile Include="..\..\Src\Target\tm4c123gxl\Mcal\Mcu.c">
<Filter>Source Files\Src\Target\tm4c123gxl\Mcal</Filter>
</ClCompile>
<ClCompile Include="..\..\Src\Target\tm4c123gxl\Mcal\SysTick.c">
<Filter>Source Files\Src\Target\tm4c123gxl\Mcal</Filter>
</ClCompile>
<ClCompile Include="..\..\Src\App\C\OS\OS_Task_stm32l432kc.c">
<Filter>Source Files\Src\App\C\OS</Filter>
</ClCompile>
<ClCompile Include="..\..\Src\App\C\OS\OS_Task_tm4c123gxl.c">
<Filter>Source Files\Src\App\C\OS</Filter>
</ClCompile>
<ClCompile Include="..\..\Src\Target\tm4c123gxl\OS\OS.c">
<Filter>Source Files\Src\Target\tm4c123gxl\OS</Filter>
</ClCompile>
<ClCompile Include="..\..\Src\Target\tm4c123gxl\Startup\IntVect.c">
<Filter>Source Files\Src\Target\tm4c123gxl\Startup</Filter>
</ClCompile>
<ClCompile Include="..\..\Src\Target\tm4c123gxl\Startup\SysStartup.c">
<Filter>Source Files\Src\Target\tm4c123gxl\Startup</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="..\..\Src\Target\stm32l432kc\Make\make_stm32l432kc.gmk">
Expand All @@ -144,6 +180,12 @@
<None Include="..\..\Src\Target\stm32f446re\Make\stm32f446re.ld">
<Filter>Source Files\Src\Target\stm32f446re\Make</Filter>
</None>
<None Include="..\..\Src\Target\tm4c123gxl\Make\make_tm4c123gxl.gmk">
<Filter>Source Files\Src\Target\tm4c123gxl\Make</Filter>
</None>
<None Include="..\..\Src\Target\tm4c123gxl\Make\tm4c123gxl.ld">
<Filter>Source Files\Src\Target\tm4c123gxl\Make</Filter>
</None>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\Src\Target\Host\Mcal\mcal_gpt.h">
Expand Down Expand Up @@ -212,5 +254,26 @@
<ClInclude Include="..\..\Src\Target\stm32l432kc\OS\OS.h">
<Filter>Source Files\Src\Target\stm32l432kc\OS</Filter>
</ClInclude>
<ClInclude Include="..\..\Src\Target\tm4c123gxl\Mcal\Gpt.h">
<Filter>Source Files\Src\Target\tm4c123gxl\Mcal</Filter>
</ClInclude>
<ClInclude Include="..\..\Src\Target\tm4c123gxl\Mcal\Mcu.h">
<Filter>Source Files\Src\Target\tm4c123gxl\Mcal</Filter>
</ClInclude>
<ClInclude Include="..\..\Src\Target\tm4c123gxl\Mcal\Reg.h">
<Filter>Source Files\Src\Target\tm4c123gxl\Mcal</Filter>
</ClInclude>
<ClInclude Include="..\..\Src\Target\tm4c123gxl\Mcal\SysTick.h">
<Filter>Source Files\Src\Target\tm4c123gxl\Mcal</Filter>
</ClInclude>
<ClInclude Include="..\..\Src\Target\tm4c123gxl\OS\OS.h">
<Filter>Source Files\Src\Target\tm4c123gxl\OS</Filter>
</ClInclude>
<ClInclude Include="..\..\Src\Target\tm4c123gxl\Startup\hw_nvic.h">
<Filter>Source Files\Src\Target\tm4c123gxl\Startup</Filter>
</ClInclude>
<ClInclude Include="..\..\Src\Target\tm4c123gxl\Startup\hw_types.h">
<Filter>Source Files\Src\Target\tm4c123gxl\Startup</Filter>
</ClInclude>
</ItemGroup>
</Project>
1 change: 1 addition & 0 deletions Src/App/C/App.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <OS/OS.h>
#include <Util/C/UtilTimer.h>


int main(void)
{
/* Configure the System clock and flash */
Expand Down
2 changes: 1 addition & 1 deletion Src/App/C/OS/OS_Cfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

#define OS_CFG_TASK_LIST_INIT \
{ \
OS_CFG_TASK_LIST_ENTRY(Task01_Init, Task01_Func, 0U, 17U), \
OS_CFG_TASK_LIST_ENTRY(Task01_Init, Task01_Func, 0U, 3U), \
}

#if defined(__cplusplus)
Expand Down
File renamed without changes.
40 changes: 40 additions & 0 deletions Src/App/C/OS/OS_Task_tm4c123gxl.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#include <stdint.h>
#include <string.h>

#include <Mcal/Mcu.h>
#include <Mcal/Reg.h>
#include <Util/C/UtilTimer.h>


static uint64_t TaskTimer01;

/************************* TASK1 *********************************/
void Task01_Init(void);
void Task01_Func(void);

void Task01_Init(void)
{
/* Enable the clock for GPIO Port F */
SYSCTL_RCGCGPIO_R = (uint32_t)0x20U;

/* Set Port F pin 1 as output (this controls all LED) */
GPIO_PORTF_DIR_R = (uint32_t)0x0EU;

/* Enable digital function for Port F for rgb leds */
GPIO_PORTF_DEN_R = (uint32_t)0x0EU;

/* Set the next timer timeout to be 1s later, */
/* Toggling will be sequentially carried out in the task. */
TaskTimer01 = TimerStart(1U);

}

void Task01_Func(void)
{
if(TimerTimeout(TaskTimer01))
{
TaskTimer01 = TimerStart(1U);

GPIO_PORTF_DATA_R ^= (uint32_t)0x02UL;
}
}
5 changes: 2 additions & 3 deletions Src/Target/stm32f446re/Make/make_stm32f446re.gmk
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#------------------------------------------------------------------------------
# Copyright Iliass Mahjoub 2023.
# Copyright Christopher Kormanyos 1995 - 2023.
# Copyright Iliass Mahjoub 2023 - 2024.
# Distributed under the Boost Software License,
# Version 1.0. (See accompanying file LICENSE_1_0.txt
# or copy at http://www.boost.org/LICENSE_1_0.txt)
Expand All @@ -20,7 +19,7 @@ PATH_OBJ = $(PATH_TMP)/Obj

ifeq ($(TYP_OS),win)

PATH_TOOLS = $(CURDIR)/../tools
PATH_TOOLS = $(CURDIR)/../tools
PATH_TOOLS_UTIL = $(PATH_TOOLS)/util
PATH_TOOLS_GCC = $(PATH_TOOLS)/gcc/gcc-11.2.0-arm-none-eabi/bin

Expand Down
1 change: 0 additions & 1 deletion Src/Target/stm32f446re/Make/stm32f446re.ld
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
******************************************************************************
**
** Copyright Iliass Mahjoub 2023 - 2024.
** Copyright Christopher Kormanyos 2007 - 2024.
**
** Distributed under the Boost Software License,
** Version 1.0. (See accompanying file LICENSE_1_0.txt
Expand Down
5 changes: 2 additions & 3 deletions Src/Target/stm32l432kc/Make/make_stm32l432kc.gmk
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#------------------------------------------------------------------------------
# Copyright Iliass Mahjoub 2023.
# Copyright Christopher Kormanyos 1995 - 2023.
# Copyright Iliass Mahjoub 2023 - 2024.
# Distributed under the Boost Software License,
# Version 1.0. (See accompanying file LICENSE_1_0.txt
# or copy at http://www.boost.org/LICENSE_1_0.txt)
Expand Down Expand Up @@ -140,7 +139,7 @@ LDFLAGS = $(CPPFLAGS) \
#------------------------------------------------------------------------------

SRC_FILES = $(PATH_SRC)/App/C/App \
$(PATH_SRC)/App/C/OS/OS_Task \
$(PATH_SRC)/App/C/OS/OS_Task_stm32l432kc \
$(PATH_TARGET)/Mcal/Gpt \
$(PATH_TARGET)/Mcal/Mcu \
$(PATH_TARGET)/Mcal/SysTick \
Expand Down
1 change: 0 additions & 1 deletion Src/Target/stm32l432kc/Make/stm32l432kc.ld
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
******************************************************************************
**
** Copyright Iliass Mahjoub 2023 - 2024.
** Copyright Christopher Kormanyos 2007 - 2024.
**
** Distributed under the Boost Software License,
** Version 1.0. (See accompanying file LICENSE_1_0.txt
Expand Down
Loading

0 comments on commit bcab1d7

Please sign in to comment.