update envirement

This commit is contained in:
Mats van Reenen
2020-12-29 20:51:32 +01:00
parent bc71a50604
commit a925a147f5
5 changed files with 131 additions and 0 deletions

2
.gitignore vendored
View File

@@ -1,5 +1,7 @@
/.settings
/Debug
/debug
/bin
/targetConfigs
/.ccsproject
/.cproject

34
.vscode/c_cpp_properties.json vendored Normal file
View File

@@ -0,0 +1,34 @@
{
"env": {
"DEBUGDIR": "./debug",
"SRCDIR" : "./src",
"BINDIR" : "./bin",
"TI_CCSDIR" : "/home/mreenen/.local/share/ccs10/ccs",
"TI_SL_CC32xxDIR": "/home/mreenen/.local/share/ccs10/simplelink_cc32xx_sdk_4_30_00_06",
"TI_INCLUDEDIR" : "${TI_SL_CC32xxDIR}/source",
"TI_XDCTOOLSDIR" : "/home/mreenen/.local/share/ccs10/xdctools_3_61_02_27_core",
"TI_KERNEL" : "${TI_SL_CC32xxDIR}/kernel/tirtos",
"TI_EABI" : "${TI_KERNEL}/packages/gnu/targets/arm/libs/install-native/arm-none-eabi/include/",
"TI_CGT" : "${TI_CCSDIR}/tools/compiler/ti-cgt-arm_20.2.1.LTS/include"
},"configurations": [
{
"name": "TI",
"compilerPath": "/usr/bin/gcc",
"includePath": [
"${TI_INCLUDEDIR}",
"${TI_INCLUDEDIR}/ti/posix/gcc",
"${TI_KERNEL}/packages",
"${TI_XDCTOOLSDIR}/packages",
"${TI_CGT}",
"${TI_EABI}"
],
"defines": [
"DEVICE_FAMALY=CC32xx",
"DEVICE=CC3220S"
]
}
],
"version": 4
}

29
.vscode/launch.json vendored Normal file
View File

@@ -0,0 +1,29 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "gcc-9 - Build and debug active file",
"type": "cppdbg",
"request": "launch",
"program": "${fileDirname}/${fileBasenameNoExtension}",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "C/C++: gcc-9 build active file",
"miDebuggerPath": "/usr/bin/gdb"
}
]
}

22
.vscode/tasks.json vendored Normal file
View File

@@ -0,0 +1,22 @@
{
"tasks": [
{
"type": "cppbuild",
"label": "build using make",
"command": "/usr/bin/make",
"args": [ "all" ],
"options": {
"cwd": "${workspaceFolder}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "Task generated by Debugger."
}
],
"version": "2.0.0"
}

44
Makefile Normal file
View File

@@ -0,0 +1,44 @@
CC := /usr/bin/gcc -x c
CURDIR := $(shell pwd)
DEBUGDIR := $(CURDIR)/debug
SRCDIR := $(CURDIR)/src
BINDIR := $(CURDIR)/bin
# TI
TI_CCSDIR := /home/mreenen/.local/share/ccs10/ccs
TI_SL_CC32xxDIR := /home/mreenen/.local/share/ccs10/simplelink_cc32xx_sdk_4_30_00_06
TI_XDCTOOLSDIR := /home/mreenen/.local/share/ccs10/xdctools_3_61_02_27_core
TI_INCLUDEDIR := $(TI_SL_CC32xxDIR)/source
TI_KERNEL := $(TI_SL_CC32xxDIR)/kernel/tirtos
TI_EABI := $(TI_KERNEL)/packages/gnu/targets/arm/libs/install-native/arm-none-eabi/include/
TI_CGT := $(TI_CCSDIR)/tools/compiler/ti-cgt-arm_20.2.1.LTS/include
TI_CCINCLUDES := -I"$(TI_INCLUDEDIR)" -I"$(TI_INCLUDEDIR)/ti/posix/gcc" -I"$(TI_KERNEL)/packages" -I"$(TI_XDCTOOLSDIR)/packages" -I"$(TI_CGT)" -I"$(TI_EABI)"
# CC ARGS
CC_INCLUDES := $(TI_CCINCLUDES)
CC_ARGS := $(CC_INCLUDES)
OBJECTS := $(DEBUGDIR)/main.o $(DEBUGDIR)/communicatieBeheer.o $(DEBUGDIR)/noodstop.o $(DEBUGDIR)/systeemBeheer.o
dirs:
mkdir -p $(DEBUGDIR) $(SRCDIR) $(BINDIR)
# compile
main.o: src/main.c dirs
$(CC) $(CC_ARGS) -c $(SRCDIR)/main.c -o $(DEBUGDIR)/main.o
communicatieBeheer.o: src/communicatieBeheer.c dirs
$(CC) $(CC_ARGS) -c $(SRCDIR)/communicatieBeheer.c -o $(DEBUGDIR)/communicatieBeheer.o
noodstop.o: src/noodstop.c dirs
$(CC) $(CC_ARGS) -c $(SRCDIR)/noodstop.c -o $(DEBUGDIR)/noodstop.o
systeemBeheer.o: src/systeemBeheer.c dirs
$(CC) $(CC_ARGS) -c $(SRCDIR)/systeemBeheer.c -o $(DEBUGDIR)/systeemBeheer.o
# link
link: main.o communicatieBeheer.o noodstop.o systeemBeheer.o
$(CC) $(CC_ARGS) -o $(BINDIR)/binary $(OBJECTS)
all: link
clean:
rm -p domeTimer $(DEBUGDIR)/*