Inital commit of relay repo's code
This commit is contained in:
parent
8607098e27
commit
f91327931a
|
@ -1,16 +1,3 @@
|
|||
# ---> CMake
|
||||
CMakeLists.txt.user
|
||||
CMakeCache.txt
|
||||
CMakeFiles
|
||||
CMakeScripts
|
||||
Testing
|
||||
Makefile
|
||||
cmake_install.cmake
|
||||
install_manifest.txt
|
||||
compile_commands.json
|
||||
CTestTestfile.cmake
|
||||
_deps
|
||||
|
||||
# ---> C
|
||||
# Prerequisites
|
||||
*.d
|
||||
|
@ -65,37 +52,16 @@ Module.symvers
|
|||
Mkfile.old
|
||||
dkms.conf
|
||||
|
||||
# ---> C++
|
||||
# Prerequisites
|
||||
*.d
|
||||
|
||||
# Compiled Object files
|
||||
*.slo
|
||||
*.lo
|
||||
*.o
|
||||
*.obj
|
||||
|
||||
# Precompiled Headers
|
||||
*.gch
|
||||
*.pch
|
||||
|
||||
# Compiled Dynamic libraries
|
||||
*.so
|
||||
*.dylib
|
||||
*.dll
|
||||
|
||||
# Fortran module files
|
||||
*.mod
|
||||
*.smod
|
||||
|
||||
# Compiled Static libraries
|
||||
*.lai
|
||||
*.la
|
||||
*.a
|
||||
*.lib
|
||||
|
||||
# Executables
|
||||
*.exe
|
||||
*.out
|
||||
*.app
|
||||
# ---> CMake
|
||||
CMakeLists.txt.user
|
||||
CMakeCache.txt
|
||||
CMakeFiles
|
||||
CMakeScripts
|
||||
Testing
|
||||
cmake_install.cmake
|
||||
install_manifest.txt
|
||||
compile_commands.json
|
||||
CTestTestfile.cmake
|
||||
_deps
|
||||
|
||||
.cache/clangd/index
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
add_library(module_name STATIC
|
||||
module_name.c
|
||||
)
|
||||
|
||||
target_include_directories(module_name PUBLIC
|
||||
${CMAKE_CURRENT_LIST_DIR}
|
||||
)
|
|
@ -0,0 +1,10 @@
|
|||
# TEST_RUNNER
|
||||
add_library(test_module_name
|
||||
test_module_name.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(test_module_name
|
||||
${CPPUTEST_LIBRARIES}/libCppUTest.a
|
||||
${CPPUTEST_LIBRARIES}/libCppUTestExt.a
|
||||
module_name
|
||||
)
|
|
@ -0,0 +1,16 @@
|
|||
/*
|
||||
* Author: username
|
||||
* Date: todays_date
|
||||
* filename: module_name.c
|
||||
* description: module_purpose
|
||||
*/
|
||||
|
||||
#include "module_name.h"
|
||||
|
||||
// dumb test function
|
||||
int add_two(int a)
|
||||
{
|
||||
int b = a;
|
||||
b += 2;
|
||||
return b;
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
/*
|
||||
* Author: username
|
||||
* Date: todays_date
|
||||
* filename: module_name.h
|
||||
* description: module_purpose
|
||||
*/
|
||||
|
||||
#ifndef module_name
|
||||
#define module_name
|
||||
|
||||
|
||||
int add_two(int a);
|
||||
|
||||
#endif //module_name
|
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
* Author: username
|
||||
* Date: todays_date
|
||||
* filename: test_module_name.c
|
||||
* description: module_purpose
|
||||
*/
|
||||
|
||||
#include "CppUTest/CommandLineTestRunner.h"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
#include "module_name.h"
|
||||
}
|
||||
|
||||
TEST_GROUP(FirstTestGroup)
|
||||
{
|
||||
void setup()
|
||||
{
|
||||
|
||||
}
|
||||
void teardown()
|
||||
{
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
TEST(FirstTestGroup, FirstTest)
|
||||
{
|
||||
FAIL("Fail me!");
|
||||
}
|
||||
|
||||
TEST(FirstTestGroup, SecondTest)
|
||||
{
|
||||
STRCMP_EQUAL("hello", "world");
|
||||
LONGS_EQUAL(1, 2);
|
||||
CHECK(false);
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
add_library(module_name STATIC
|
||||
module_name.c
|
||||
)
|
||||
|
||||
target_include_directories(module_name PUBLIC
|
||||
${CMAKE_CURRENT_LIST_DIR}
|
||||
)
|
|
@ -0,0 +1,10 @@
|
|||
# TEST_RUNNER
|
||||
add_library(test_module_name
|
||||
test_module_name.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(test_module_name
|
||||
${CPPUTEST_LIBRARIES}/libCppUTest.a
|
||||
${CPPUTEST_LIBRARIES}/libCppUTestExt.a
|
||||
module_name
|
||||
)
|
|
@ -0,0 +1,16 @@
|
|||
/*
|
||||
* Author: username
|
||||
* Date: todays_date
|
||||
* filename: module_name.c
|
||||
* description: module_purpose
|
||||
*/
|
||||
|
||||
#include "module_name.h"
|
||||
|
||||
// dumb test function
|
||||
int add_two(int a)
|
||||
{
|
||||
int b = a;
|
||||
b += 2;
|
||||
return b;
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
/**
|
||||
* @brief PUT_TEXT_HERE
|
||||
* @details This file is...
|
||||
* @author username
|
||||
* @date todays_date
|
||||
* @copyright None
|
||||
* @file module_name.h
|
||||
*/
|
||||
|
||||
#ifndef module_name
|
||||
#define module_name
|
||||
|
||||
|
||||
/**
|
||||
* A function that adds two to a number
|
||||
* @param a The first argument
|
||||
*/
|
||||
int add_two(int a);
|
||||
|
||||
#endif //module_name
|
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
* Author: username
|
||||
* Date: todays_date
|
||||
* filename: test_module_name.c
|
||||
* description: module_purpose
|
||||
*/
|
||||
|
||||
#include "CppUTest/CommandLineTestRunner.h"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
#include "module_name.h"
|
||||
}
|
||||
|
||||
TEST_GROUP(test_module_name)
|
||||
{
|
||||
void setup()
|
||||
{
|
||||
|
||||
}
|
||||
void teardown()
|
||||
{
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
TEST(test_module_name, FirstTest)
|
||||
{
|
||||
FAIL("Fail me!");
|
||||
}
|
||||
|
||||
TEST(test_module_name, SecondTest)
|
||||
{
|
||||
STRCMP_EQUAL("hello", "world");
|
||||
LONGS_EQUAL(1, 2);
|
||||
CHECK(false);
|
||||
}
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
cmake_minimum_required(VERSION 3.20)
|
||||
|
||||
# Use the fancy version substitution
|
||||
project(main
|
||||
VERSION 1.0
|
||||
DESCRIPTION "template for cmake + cpputest"
|
||||
LANGUAGES C CXX
|
||||
)
|
||||
enable_testing()
|
||||
|
||||
set(TARGET_GROUP production CACHE STRING "Group to build")
|
||||
|
||||
if(MSVC OR MSYS OR MINGW)
|
||||
message("### SETUP FOR WINDOWS ###")
|
||||
add_definitions(-DWINDOWS)
|
||||
else()
|
||||
message("### SETUP FOR UNIX ###")
|
||||
add_definitions(-DUNIX)
|
||||
endif()
|
||||
|
||||
# For being able to used LSP
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
|
||||
# Request C 17 standard features
|
||||
set(CMAKE_C_STANDARD 11)
|
||||
set(CMAKE_C_STANDARD_REQUIRED True)
|
||||
# set(CMAKE_C_FLAGS "-Wall -Werror -Wpedantic")
|
||||
|
||||
# SETUP THE CXX flags for .cpp
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED True)
|
||||
set(CMAKE_CXX_FLAGS "-Wall -Werror -Wpedantic")
|
||||
|
||||
|
||||
# #######################################
|
||||
# TESTING STUFF
|
||||
# #######################################
|
||||
|
||||
|
||||
if (UNIT_TESTING)
|
||||
add_definitions(-DUNIT_TESTING)
|
||||
if(DEFINED ENV{CPPUTEST_HOME})
|
||||
message(STATUS "Using CppUTest home: $ENV{CPPUTEST_HOME}")
|
||||
set(CPPUTEST_INCLUDE_DIRS $ENV{CPPUTEST_HOME}/include)
|
||||
set(CPPUTEST_LIBRARIES $ENV{CPPUTEST_HOME}/lib)
|
||||
set(CPPUTEST_LDFLAGS CppUTest CppUTestExt)
|
||||
else()
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_search_module(CPPUTEST REQUIRED cpputest>=3.8)
|
||||
message(STATUS "Found CppUTest version ${CPPUTEST_VERSION}")
|
||||
endif()
|
||||
|
||||
include_directories(
|
||||
${CPPUTEST_INCLUDE_DIRS}
|
||||
/usr/include/c++/11/
|
||||
./inc
|
||||
./mocks
|
||||
)
|
||||
link_directories(${CPPUTEST_LIBRARIES})
|
||||
|
||||
add_subdirectory(mocks)
|
||||
add_subdirectory(tests)
|
||||
|
||||
endif()
|
||||
|
||||
# #######################################
|
||||
# PROJECT SPECIFIC
|
||||
# #######################################
|
||||
|
||||
|
||||
include_directories(
|
||||
/usr/local/avr/avr/include
|
||||
./inc
|
||||
)
|
||||
|
||||
add_subdirectory(src)
|
|
@ -0,0 +1,113 @@
|
|||
#
|
||||
# There exist several targets which are by default empty and which can be
|
||||
# used for execution of your targets. These targets are usually executed
|
||||
# before and after some main targets. They are:
|
||||
#
|
||||
# .build-pre: called before 'build' target
|
||||
# .build-post: called after 'build' target
|
||||
# .clean-pre: called before 'clean' target
|
||||
# .clean-post: called after 'clean' target
|
||||
# .clobber-pre: called before 'clobber' target
|
||||
# .clobber-post: called after 'clobber' target
|
||||
# .all-pre: called before 'all' target
|
||||
# .all-post: called after 'all' target
|
||||
# .help-pre: called before 'help' target
|
||||
# .help-post: called after 'help' target
|
||||
#
|
||||
# Targets beginning with '.' are not intended to be called on their own.
|
||||
#
|
||||
# Main targets can be executed directly, and they are:
|
||||
#
|
||||
# build build a specific configuration
|
||||
# clean remove built files from a configuration
|
||||
# clobber remove all built files
|
||||
# all build all configurations
|
||||
# help print help mesage
|
||||
#
|
||||
# Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and
|
||||
# .help-impl are implemented in nbproject/makefile-impl.mk.
|
||||
#
|
||||
# Available make variables:
|
||||
#
|
||||
# CND_BASEDIR base directory for relative paths
|
||||
# CND_DISTDIR default top distribution directory (build artifacts)
|
||||
# CND_BUILDDIR default top build directory (object files, ...)
|
||||
# CONF name of current configuration
|
||||
# CND_ARTIFACT_DIR_${CONF} directory of build artifact (current configuration)
|
||||
# CND_ARTIFACT_NAME_${CONF} name of build artifact (current configuration)
|
||||
# CND_ARTIFACT_PATH_${CONF} path to build artifact (current configuration)
|
||||
# CND_PACKAGE_DIR_${CONF} directory of package (current configuration)
|
||||
# CND_PACKAGE_NAME_${CONF} name of package (current configuration)
|
||||
# CND_PACKAGE_PATH_${CONF} path to package (current configuration)
|
||||
#
|
||||
# NOCDDL
|
||||
|
||||
|
||||
# Environment
|
||||
MKDIR=mkdir
|
||||
CP=cp
|
||||
CCADMIN=CCadmin
|
||||
RANLIB=ranlib
|
||||
|
||||
|
||||
# build
|
||||
build: .build-post
|
||||
|
||||
.build-pre:
|
||||
# Add your pre 'build' code here...
|
||||
|
||||
.build-post: .build-impl
|
||||
# Add your post 'build' code here...
|
||||
|
||||
|
||||
# clean
|
||||
clean: .clean-post
|
||||
|
||||
.clean-pre:
|
||||
# Add your pre 'clean' code here...
|
||||
# WARNING: the IDE does not call this target since it takes a long time to
|
||||
# simply run make. Instead, the IDE removes the configuration directories
|
||||
# under build and dist directly without calling make.
|
||||
# This target is left here so people can do a clean when running a clean
|
||||
# outside the IDE.
|
||||
|
||||
.clean-post: .clean-impl
|
||||
# Add your post 'clean' code here...
|
||||
|
||||
|
||||
# clobber
|
||||
clobber: .clobber-post
|
||||
|
||||
.clobber-pre:
|
||||
# Add your pre 'clobber' code here...
|
||||
|
||||
.clobber-post: .clobber-impl
|
||||
# Add your post 'clobber' code here...
|
||||
|
||||
|
||||
# all
|
||||
all: .all-post
|
||||
|
||||
.all-pre:
|
||||
# Add your pre 'all' code here...
|
||||
|
||||
.all-post: .all-impl
|
||||
# Add your post 'all' code here...
|
||||
|
||||
|
||||
# help
|
||||
help: .help-post
|
||||
|
||||
.help-pre:
|
||||
# Add your pre 'help' code here...
|
||||
|
||||
.help-post: .help-impl
|
||||
# Add your post 'help' code here...
|
||||
|
||||
|
||||
|
||||
# include project implementation makefile
|
||||
include nbproject/Makefile-impl.mk
|
||||
|
||||
# include project make variables
|
||||
include nbproject/Makefile-variables.mk
|
108
README.md
108
README.md
|
@ -1,5 +1,105 @@
|
|||
# Relay_and_Socket_Protection
|
||||
# FG004_A(Relay Tester)
|
||||
|
||||
## Description
|
||||
|
||||
This embedded firmware for testing relay's, it uses an attiny404 to measure the
|
||||
make and break time of a relay.
|
||||
|
||||
### Micro Controller Pins
|
||||
|
||||
**ATtiny404**
|
||||
|
||||
1. VDD(+5v)
|
||||
2. PA4(SW2/BREAK)
|
||||
3. PA5(SW1/MAKE)
|
||||
4. PA6(RELAY_READ)
|
||||
5. PA7(RELAY_OUT)
|
||||
6. PB3(BIT6)
|
||||
7. PB2(BIT5)
|
||||
8. PB1(BIT4)
|
||||
9. PB0(BIT3)
|
||||
10. RST(NC)
|
||||
11. PA1(BIT2)
|
||||
12. PA2(BIT1)
|
||||
13. PA3(BIT0)
|
||||
14. VSS(GND)
|
||||
|
||||
*key*
|
||||
NC:: Not Connected
|
||||
PBX:: Port B pin X
|
||||
PAX:: Port A pin X
|
||||
RST:: Reset pin
|
||||
BIT:: A bit place out of a byte of data for output
|
||||
|
||||
## Project Layout
|
||||
|
||||
**Tree -L 1, output**
|
||||
```
|
||||
.
|
||||
├── avr-gcc-toolchain.cmake
|
||||
├── build
|
||||
├── CMakeLists.txt
|
||||
├── compile_commands.json -> ./build/compile_commands.json
|
||||
├── docs
|
||||
├── Doxyfile
|
||||
├── inc
|
||||
├── mocks
|
||||
├── otto.sh
|
||||
├── README.md
|
||||
├── setup.sh
|
||||
├── src
|
||||
└── tests
|
||||
|
||||
6 directories, 7 files
|
||||
```
|
||||
|
||||
The source code required to run/build the project is in the `/src` directory,
|
||||
with the headers residing inside the `/inc` directory for most public modules.
|
||||
|
||||
All other directories are for supporting the development cycle and are used for
|
||||
testitng the code base to ensure accuracy and quality. These are contained in
|
||||
the `tests` and `mocks` directories.
|
||||
|
||||
Documentation that has been generated is inside the docs folder which contains
|
||||
the html output that can be browswed via your regular web browser.
|
||||
|
||||
PDF genreation from the doumentaiton is also possible if enabled through the
|
||||
`Doxyfile` inside the projects root directory.
|
||||
|
||||
The build directory contains the output and makefiles genrerated automatically
|
||||
when using CMake.
|
||||
|
||||
This build directory also holds the bin files genreated along with the hex and
|
||||
elf files.
|
||||
|
||||
## Build Requirements
|
||||
|
||||
- AVR-GCC toolchain OR XC8 from microchip.
|
||||
- Make OR CMAKE
|
||||
- avrdude
|
||||
- A AVR programmer, usbasp for older chips and UPDI for newer ones.
|
||||
|
||||
|
||||
## Dev Requirements
|
||||
|
||||
- ATtiny404 series micro-controller
|
||||
- AVR-GCC toolchain.
|
||||
- Cmake
|
||||
- cpputest(Unit testing harness.)
|
||||
- Doxygen(For documentation)
|
||||
- Git(For version control)
|
||||
|
||||
|
||||
## Running Unit Tests
|
||||
|
||||
To run the cppunit tests you can use the included shell script inside a bash
|
||||
shell.
|
||||
|
||||
```sh
|
||||
echo "1" | ./otto.sh
|
||||
```
|
||||
|
||||
The command runs the otto script which automates parts of the development cycle
|
||||
such as running and building tests, compiling hex files and flashing the code
|
||||
to a micro-controller using arvdude.
|
||||
|
||||
Combined code for the ATtiny404 micro-controller that combines the relay testing code and the socket protection code.
|
||||
|
||||
It also adds some additional features.
|
|
@ -0,0 +1,57 @@
|
|||
# ###############################
|
||||
# AVR-GCC toolchain file
|
||||
# ###############################
|
||||
|
||||
# Specify the cross-compiler
|
||||
set(CMAKE_SYSTEM_NAME Generic)
|
||||
set(CMAKE_SYSTEM_VERSION 1)
|
||||
set(CMAKE_SYSTEM_PROCESSOR avr)
|
||||
|
||||
# Without this flag, CMake is unable to pass the test compilation check
|
||||
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
|
||||
|
||||
# Specify the compiler and linker
|
||||
#set(AVR_MCU atmega328p) # The old Classic
|
||||
#set(AVR_MCU attiny85) # The older ATtiny series, avr25
|
||||
set(AVR_MCU attiny404) # this is the avrxmega3 series
|
||||
#set(AVR_MCU avr64dd28) # Newer DX series, avrxmega2
|
||||
|
||||
# The default frequency of an 328p devboard using the external crystal.
|
||||
#set(F_CPU 16000000UL)
|
||||
set(F_CPU 20000000UL)
|
||||
#set(F_CPU 8000000)
|
||||
#set(F_PER 3333333)
|
||||
add_compile_definitions(F_CPU=${F_CPU})
|
||||
# add_compile_definitions(MCU=atmega328p)
|
||||
#add_compile_definitions(__AVR_ATmega328P__)
|
||||
add_compile_definitions(__AVR_ATtiny404__)
|
||||
|
||||
# Set up the programmer for it
|
||||
#set(PROGRAMMER usbasp-clone)
|
||||
#set(PROGRAMMER arduino)
|
||||
set(PROGRAMMER serialupdi)
|
||||
|
||||
|
||||
# Set the Port for the programmer
|
||||
set(PORT /dev/ttyUSB0)
|
||||
|
||||
|
||||
# Define the toolchain executables
|
||||
set(CMAKE_C_COMPILER avr-gcc)
|
||||
set(CMAKE_CXX_COMPILER avr-g++)
|
||||
set(CMAKE_ASM_COMPILER avr-gcc)
|
||||
set(CMAKE_LINKER avr-ld)
|
||||
set(CMAKE_OBJCOPY avr-objcopy)
|
||||
set(CMAKE_SIZE avr-size)
|
||||
|
||||
|
||||
# Define compile options
|
||||
set(CMAKE_C_FLAGS " -Os -mmcu=${AVR_MCU} -DF_CPU=${F_CPU}")
|
||||
set(CMAKE_CXX_FLAGS "-mmcu=${AVR_MCU} -DF_CPU=${F_CPU}")
|
||||
set(CMAKE_EXE_LINKER_FLAGS_INIT "-mmcu=${AVR_MCU}")
|
||||
|
||||
|
||||
# Define the archiver and other tools
|
||||
set(CMAKE_AR avr-ar)
|
||||
set(CMAKE_RANLIB avr-ranlib)
|
||||
|
|
@ -0,0 +1,256 @@
|
|||
1962 1724696933573 GEN4_CONNECT_DIAGNOSTICS:MPLABCommTool is null
|
||||
|
||||
1962 1724696933573 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 Pre:GetFirmwareInfo
|
||||
1962 1724696933573 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 Payload
|
||||
1962 1724696933573 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 null
|
||||
1962 1724696933573 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 Payload End
|
||||
1962 1724696933581 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 Post:GetFirmwareInfo
|
||||
1962 1724696933581 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 Return Value
|
||||
1962 1724696933581 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 FirmwareInfo: Values:
|
||||
1962 1724696933581 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 FirmwareInfo: boot = false, bootVer = 00.00.10, apVer = 02.01.83, fpgaVer = ff.ff.ff, scriptVer = 00.07.47, macAddress = 0504983776751805049485148484956, devID = a1020e01, devID1 = 2, devSN0 = ffffffff, devSN1 = ffffffff, serialNumber = 020026702RYN031742, appCommitID = null, scriptCommitID = 974b928e70, PCB_ID = 2
|
||||
1962 1724696933581 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 Return End
|
||||
|
||||
1962 1724696933581 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 Pre:SetPowerInfo
|
||||
1962 1724696933581 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 Payload
|
||||
1962 1724696933581 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 PowerInfo: Values:
|
||||
1962 1724696933581 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 PowerInfo: shotDownSystem = true, isToolPower = false, voltage = 0.000000, useVppFirst = false, useLowVoltageProgramming = true, useMaintainActivePower = false
|
||||
1962 1724696933581 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 Payload End
|
||||
1962 1724696933581 XXXX 1724696933581, Thread 1962: XXXX 1724696933581, Entering Thread 1962: Commands::runScriptBasic with script contents. contents[0] = 0x39, ...
|
||||
1962 1724696933582 XXXX 1724696933582, Thread 1962: XXXX 1724696933582, Exiting Thread 1962: Commands::runScriptBasic
|
||||
1962 1724696933582 XXXX 1724696933582, Thread 1962: XXXX 1724696933582, Entering Thread 1962: Commands::runScriptBasic with script contents. contents[0] = 0x44, ...
|
||||
1962 1724696933594 XXXX 1724696933594, Thread 1962: XXXX 1724696933594, Exiting Thread 1962: Commands::runScriptBasic
|
||||
1962 1724696933595 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 Post:SetPowerInfo
|
||||
1962 1724696933595 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 Return Value
|
||||
1962 1724696933595 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 none
|
||||
1962 1724696933595 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 Return End
|
||||
1962 1724696933595 GEN4_CONNECT_DIAGNOSTICS:Removing plug and play observer com.microchip.mplab.mdbcore.RI4Tool.RI4ToolBase$RI4PlugNPlayObserver@231faf9e
|
||||
1962 1724696933595 GEN4_CONNECT_DIAGNOSTICS:Begin PlugNPlayObservers list dump:
|
||||
1962 1724696933595 GEN4_CONNECT_DIAGNOSTICS:End PlugNPlayObservers list dump:
|
||||
1962 1724696933645 GEN4_CONNECT_DIAGNOSTICS:Calling RIDbgToolCom.Disconnect
|
||||
1962 1724696933645 GEN4_CONNECT_DIAGNOSTICS:Calling MPLABCommTool.Detach to remove tool from plug and play list
|
||||
1962 1724696933645 GEN4_CONNECT_DIAGNOSTICS:Calling RIDbgToolCom.DisconnectFromMPlabComm
|
||||
1962 1724696933645 GEN4_CONNECT_DIAGNOSTICS:Calling MPLABCommTool.Disconnect
|
||||
1969 1724698230261 GEN4_CONNECT_DIAGNOSTICS:MPLABCommTool is NOT null
|
||||
1969 1724698230261 GEN4_CONNECT_DIAGNOSTICS:AttachedToolPID = 9036, AttachedToolVID = 4d8
|
||||
1969 1724698230261 GEN4_CONNECT_DIAGNOSTICS:transport type = USB
|
||||
1969 1724698230261 GEN4_CONNECT_DIAGNOSTICS:AttachedToolPID = 9036, AttachedToolVID = 4d8
|
||||
1969 1724698230263 com.microchip.mplab.mdbcore.RealICETool.RIDbgToolCom
|
||||
1969 1724698230263 GEN4_CONNECT_DIAGNOSTICS:Before MPLABCommTool.Connect()
|
||||
1969 1724698230263 GEN4_CONNECT_DIAGNOSTICS:After MPLABCommTool.Connect()
|
||||
1969 1724698230263 GEN4_CONNECT_DIAGNOSTICS:MPLABCommTool.Connect() returned MPLABCOMM_NO_ERROR
|
||||
1969 1724698230263 GEN4_CONNECT_DIAGNOSTICS:Attaching to MPLABCommTool plugnplay
|
||||
1969 1724698230263 GEN4_CONNECT_DIAGNOSTICS:Adding new plug and play observer com.microchip.mplab.mdbcore.RI4Tool.RI4ToolBase$RI4PlugNPlayObserver@7eecc7b4
|
||||
1969 1724698230263 GEN4_CONNECT_DIAGNOSTICS:Begin PlugNPlayObservers list dump:
|
||||
1969 1724698230263 GEN4_CONNECT_DIAGNOSTICS:com.microchip.mplab.mdbcore.RI4Tool.RI4ToolBase$RI4PlugNPlayObserver@7eecc7b4
|
||||
1969 1724698230263 GEN4_CONNECT_DIAGNOSTICS:End PlugNPlayObservers list dump:
|
||||
1969 1724698230263 GEN4_CONNECT_DIAGNOSTICS:Registering for alternate PNP notifications. CommPnPCriteria.cPIDList = [9035], CommPnPCriteria.cSerialNumber = 020026702ryn031742
|
||||
|
||||
1969 1724698230301 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Pre:init
|
||||
1969 1724698230301 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Payload
|
||||
1969 1724698230301 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 DeviceInfo: Values:
|
||||
1969 1724698230301 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 DeviceInfo: pcAddress = 7fffffffffffffff, Vpp = 5.00, useRowEraseIfVoltageIsLow = false, voltageBelowWhichUseRowErase = 0.00, deviceName = ATtiny404, programmerType = AVR
|
||||
1969 1724698230301 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 DeviceInfo: MemInfo values:
|
||||
1969 1724698230301 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 DeviceInfo: mask = ffff, exists = true, startAddr = 00000000, endAddr = 00000fff, rowSize = 0040, rowEraseSize = 0040, addrInc = 0001, widthProgram = 0001
|
||||
1969 1724698230301 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 DeviceInfo: mask = 00ff, exists = true, startAddr = 00821280, endAddr = 0083128a, rowSize = 0001, rowEraseSize = 0000, addrInc = 0001, widthProgram = 0001
|
||||
1969 1724698230301 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 DeviceInfo: mask = 0000, exists = false, startAddr = 00000000, endAddr = 00000000, rowSize = 0000, rowEraseSize = 0000, addrInc = 0000, widthProgram = 0000
|
||||
1969 1724698230301 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 DeviceInfo: mask = 00ff, exists = true, startAddr = 00001400, endAddr = 0000147f, rowSize = 0020, rowEraseSize = 0000, addrInc = 0001, widthProgram = 0001
|
||||
1969 1724698230301 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 DeviceInfo: mask = 00ff, exists = true, startAddr = 00001300, endAddr = 0000131f, rowSize = 0020, rowEraseSize = 0000, addrInc = 0001, widthProgram = 0001
|
||||
1969 1724698230301 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 DeviceInfo: mask = 0000, exists = false, startAddr = 00000000, endAddr = 00000000, rowSize = 0000, rowEraseSize = 0040, addrInc = 0000, widthProgram = 0000
|
||||
1969 1724698230301 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 DeviceInfo: mask = 0000, exists = false, startAddr = 00000000, endAddr = 00000000, rowSize = 0000, rowEraseSize = 0000, addrInc = 0001, widthProgram = 0001
|
||||
1969 1724698230301 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 DeviceInfo: mask = 0000, exists = false, startAddr = 00000000, endAddr = 00000000, rowSize = 0000, rowEraseSize = 0000, addrInc = 0000, widthProgram = 0000
|
||||
1969 1724698230301 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 DeviceInfo: mask = 0000, exists = false, startAddr = 00000000, endAddr = 00000000, rowSize = 0000, rowEraseSize = 0000, addrInc = 0000, widthProgram = 0000
|
||||
1969 1724698230301 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 DeviceInfo: mask = 0000, exists = false, startAddr = 00000000, endAddr = 00000000, rowSize = 0000, rowEraseSize = 0000, addrInc = 0000, widthProgram = 0000
|
||||
1969 1724698230301 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 DeviceInfo: mask = 0000, exists = false, startAddr = 00000000, endAddr = 00000000, rowSize = 0000, rowEraseSize = 0000, addrInc = 0000, widthProgram = 0000
|
||||
1969 1724698230301 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 DeviceInfo: mask = 0000, exists = false, startAddr = 00000000, endAddr = 00000000, rowSize = 0000, rowEraseSize = 0000, addrInc = 0001, widthProgram = 0001
|
||||
1969 1724698230301 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 DeviceInfo: mask = 0000, exists = false, startAddr = 00000000, endAddr = 00000000, rowSize = 0000, rowEraseSize = 0000, addrInc = 0000, widthProgram = 0000
|
||||
1969 1724698230301 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 DeviceInfo: mask = 0000, exists = false, startAddr = 00000000, endAddr = 00000000, rowSize = 0000, rowEraseSize = 0000, addrInc = 0000, widthProgram = 0000
|
||||
1969 1724698230301 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 DeviceInfo: mask = 0000, exists = false, startAddr = 00000000, endAddr = 00000000, rowSize = 0000, rowEraseSize = 0000, addrInc = 0000, widthProgram = 0000
|
||||
1969 1724698230301 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 DeviceInfo: mask = 0000, exists = false, startAddr = 00000000, endAddr = 00000000, rowSize = 0000, rowEraseSize = 0000, addrInc = 0000, widthProgram = 0000
|
||||
1969 1724698230301 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 DeviceInfo: mask = 7fffffff, exists = true, startAddr = 00001100, endAddr = 0000113f, rowSize = 0001, rowEraseSize = 0000, addrInc = 0001, widthProgram = 0001
|
||||
1969 1724698230301 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 DeviceInfo: mask = 0000, exists = false, startAddr = 00000000, endAddr = 00000000, rowSize = 0000, rowEraseSize = 0000, addrInc = 0000, widthProgram = 0000
|
||||
1969 1724698230301 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 DeviceInfo: mask = 0000, exists = false, startAddr = 00000000, endAddr = 00000000, rowSize = 0000, rowEraseSize = 0000, addrInc = 0000, widthProgram = 0000
|
||||
1969 1724698230301 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 DeviceInfo: mask = 0000, exists = false, startAddr = 00000000, endAddr = 00000000, rowSize = 0000, rowEraseSize = 0000, addrInc = 0000, widthProgram = 0000
|
||||
1969 1724698230301 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 DeviceInfo: mask = 0000, exists = false, startAddr = 00000000, endAddr = 00000000, rowSize = 0000, rowEraseSize = 0000, addrInc = 0000, widthProgram = 0000
|
||||
1969 1724698230301 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 DeviceInfo: mask = 0000, exists = false, startAddr = 00000000, endAddr = 00000000, rowSize = 0000, rowEraseSize = 0000, addrInc = 0000, widthProgram = 0000
|
||||
1969 1724698230301 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 DeviceInfo: mask = 0000, exists = false, startAddr = 00000000, endAddr = 00000000, rowSize = 0000, rowEraseSize = 0000, addrInc = 0000, widthProgram = 0000
|
||||
1969 1724698230301 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 DeviceInfo: CfgRequiredBitsMask Values:
|
||||
1969 1724698230301 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Address = 00001100, Mask = 00000000
|
||||
1969 1724698230301 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Address = 00001101, Mask = 00000000
|
||||
1969 1724698230301 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Address = 00001102, Mask = 00000000
|
||||
1969 1724698230301 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Address = 00001103, Mask = 00000000
|
||||
1969 1724698230301 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Address = 00001104, Mask = 00000000
|
||||
1969 1724698230301 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Address = 00001105, Mask = 00000000
|
||||
1969 1724698230301 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Address = 00001106, Mask = 00000000
|
||||
1969 1724698230301 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Address = 00001107, Mask = 00000000
|
||||
1969 1724698230301 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Address = 00001108, Mask = 00000000
|
||||
1969 1724698230301 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Address = 00001109, Mask = 00000000
|
||||
1969 1724698230301 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Address = 0000110a, Mask = 00000000
|
||||
1969 1724698230301 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Address = 0000110b, Mask = 00000000
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Address = 0000110c, Mask = 00000000
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Address = 00001120, Mask = 00000000
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Address = 00001121, Mask = 00000000
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Address = 00001122, Mask = 00000000
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Address = 00001123, Mask = 00000000
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Address = 00001124, Mask = 00000000
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Address = 00001125, Mask = 00000000
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Address = 00821280, Mask = 000000ff
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Address = 00821281, Mask = 000000ff
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Address = 00821282, Mask = 00000083
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Address = 00821284, Mask = 000000ff
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Address = 00821285, Mask = 000000cd
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Address = 00821286, Mask = 00000007
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Address = 00821287, Mask = 000000ff
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Address = 00821288, Mask = 000000ff
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Address = 0083128a, Mask = 000000ff
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 BasicInfo: Values:
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 BasicInfo: InputStream = com.microchip.mplab.libs.toolpacksupport.EquatableFileInputStream@a575cadb, ToolFlavor = PIC32C
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Payload End
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Post:init
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Return Value
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 none
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Return End
|
||||
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Pre:GetInterfaceProvider
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Payload
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 RI4DebugInterface
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Payload End
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Post:GetInterfaceProvider
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Return Value
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 com.microchip.mplab.libs.RI4ToolsController.implementations.RI4DebugInterfaceImpl@6260dc95
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Return End
|
||||
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Pre:GetInterfaceProvider
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Payload
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 RI4ProgramInterface
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Payload End
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Post:GetInterfaceProvider
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Return Value
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 com.microchip.mplab.libs.RI4ToolsController.implementations.RI4ProgramInterfaceImpl@626b7777
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Return End
|
||||
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Pre:GetInterfaceProvider
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Payload
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 RI4ConnectInterface
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Payload End
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Post:GetInterfaceProvider
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Return Value
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 com.microchip.mplab.libs.PK4ToolsController.PK4ConnectInterfaceImpl@7aa2dde9
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Return End
|
||||
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Pre:GetInterfaceProvider
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Payload
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 RI4ControllerDiagnosticsInterface
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Payload End
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Post:GetInterfaceProvider
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Return Value
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 com.microchip.mplab.libs.RI4ToolsController.implementations.RI4ControllerDiagnosticsInterfaceImpl@d988019
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Return End
|
||||
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Pre:GetInterfaceProvider
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Payload
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 ProgrammerToGo
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Payload End
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Post:GetInterfaceProvider
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Return Value
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 com.microchip.mplab.libs.RI4ToolsController.implementations.ProgrammerToGoImpl@6978614b
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Return End
|
||||
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Pre:GetInterfaceProvider
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Payload
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Status
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Payload End
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Post:GetInterfaceProvider
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Return Value
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 null
|
||||
1969 1724698230302 GEN4_TO_CONTROLLER_LOG:GEN4_INIT_INT_LOG_ATtiny404 Return End
|
||||
|
||||
1969 1724698230303 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 Pre:EstablishCommunincations
|
||||
1969 1724698230303 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 Payload
|
||||
1969 1724698230303 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 com.microchip.mplab.mdbcore.PK5Tool.PK5Com@2f170212
|
||||
1969 1724698230303 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 Payload End
|
||||
1969 1724698230303 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 Post:EstablishCommunincations
|
||||
1969 1724698230303 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 Return Value
|
||||
1969 1724698230303 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 true
|
||||
1969 1724698230303 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 Return End
|
||||
|
||||
1969 1724698230303 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 Pre:GetFirmwareInfo
|
||||
1969 1724698230303 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 Payload
|
||||
1969 1724698230303 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 null
|
||||
1969 1724698230303 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 Payload End
|
||||
1969 1724698230310 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 Post:GetFirmwareInfo
|
||||
1969 1724698230310 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 Return Value
|
||||
1969 1724698230310 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 FirmwareInfo: Values:
|
||||
1969 1724698230311 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 FirmwareInfo: boot = false, bootVer = 00.00.10, apVer = 02.01.83, fpgaVer = ff.ff.ff, scriptVer = 00.07.47, macAddress = 0504983776751805049485148484956, devID = a1020e01, devID1 = 2, devSN0 = ffffffff, devSN1 = ffffffff, serialNumber = 020026702RYN031742, appCommitID = null, scriptCommitID = 974b928e70, PCB_ID = 2
|
||||
1969 1724698230311 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 Return End
|
||||
1969 1724698230311 XXXX 1724698230311, Thread 1969: XXXX 1724698230311, Entering Thread 1969: Commands::runScriptWithUpload with script contents. contents[0] = 0x5e, ...
|
||||
1969 1724698230311 XXXX 1724698230311, Thread 1969: XXXX 1724698230311, Entering Thread 1969: ToolCommUsb::readTransfer, sideData is 0xd bytes long, transferDataLength is 0x4 bytes long
|
||||
1969 1724698230313 XXXX 1724698230313, Thread 1969: XXXX 1724698230313, Exiting Thread 1969: ToolCommUsb::readTransfer, cr.status = 0x0
|
||||
1969 1724698230313 XXXX 1724698230313, Thread 1969: XXXX 1724698230313, Exiting Thread 1969: Commands::runScriptWithUpload
|
||||
1969 1724698230313 GEN4_CONNECT_DIAGNOSTICS:ENTERING: com.microchip.mplab.mdbcore.RI4Tool.ConnectionHandler.CheckForFWUpdates()
|
||||
1969 1724698230313 GEN4_CONNECT_DIAGNOSTICS:Created FirmwareUpdateHandler com.microchip.mplab.mdbcore.PK5Tool.PK5FirmwareUpdateHandler@501163dc
|
||||
1969 1724698230313 GEN4_CONNECT_DIAGNOSTICS:ENTERING: com.microchip.mplab.mdbcore.RI4Tool.FirmwareUpdateHandler.GetUpdateInfo()
|
||||
1969 1724698230318 GEN4_CONNECT_DIAGNOSTICS:Parsing file for firmware updates
|
||||
1969 1724698230318 GEN4_CONNECT_DIAGNOSTICS:ENTERING: com.microchip.mplab.mdbcore.RI4Tool.FirmwareUpdateHandler.ri4ParseSelectedVersionsFromJamFile()
|
||||
1969 1724698230318 GEN4_CONNECT_DIAGNOSTICS:Jame file line = app.hex,020183
|
||||
1969 1724698230318 GEN4_CONNECT_DIAGNOSTICS:Jame file line = boot.hex,000010
|
||||
1969 1724698230318 GEN4_CONNECT_DIAGNOSTICS:Jame file line = scripts.xml,000747
|
||||
1969 1724698230318 GEN4_CONNECT_DIAGNOSTICS:Selected firmware version for Boot = 00.00.10
|
||||
1969 1724698230318 GEN4_CONNECT_DIAGNOSTICS:Selected firmware version for ap = 02.01.ffffff83
|
||||
1969 1724698230318 GEN4_CONNECT_DIAGNOSTICS:EXITING: com.microchip.mplab.mdbcore.RI4Tool.FirmwareUpdateHandler.ri4ParseSelectedVersionsFromJamFile()
|
||||
1969 1724698230318 GEN4_CONNECT_DIAGNOSTICS:EXITING: com.microchip.mplab.mdbcore.RI4Tool.FirmwareUpdateHandler.GetUpdateInfo()
|
||||
1969 1724698230318 GEN4_CONNECT_DIAGNOSTICS:ENTERING: com.microchip.mplab.mdbcore.RI4Tool.FirmwareUpdateHandler.updateRI4ToolsFirmware(FirmwareInfo, UpdateMessage)
|
||||
1969 1724698230320 GEN4_CONNECT_DIAGNOSTICS:appNeedsUpdate returned false
|
||||
1969 1724698230320 GEN4_CONNECT_DIAGNOSTICS:EXITING: com.microchip.mplab.mdbcore.RI4Tool.FirmwareUpdateHandler.updateRI4ToolsFirmware(FirmwareInfo, UpdateMessage)
|
||||
1969 1724698230320 GEN4_CONNECT_DIAGNOSTICS:EXITING: com.microchip.mplab.mdbcore.RI4Tool.ConnectionHandler.CheckForFWUpdates()
|
||||
|
||||
1969 1724698230320 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 Pre:SetPowerInfo
|
||||
1969 1724698230320 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 Payload
|
||||
1969 1724698230320 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 PowerInfo: Values:
|
||||
1969 1724698230320 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 PowerInfo: shotDownSystem = false, isToolPower = true, voltage = 5.000000, useVppFirst = false, useLowVoltageProgramming = true, useMaintainActivePower = false
|
||||
1969 1724698230320 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 Payload End
|
||||
1969 1724698230320 XXXX 1724698230320, Thread 1969: XXXX 1724698230320, Entering Thread 1969: Commands::runScriptBasic with script contents. contents[0] = 0x39, ...
|
||||
1969 1724698230321 XXXX 1724698230321, Thread 1969: XXXX 1724698230321, Exiting Thread 1969: Commands::runScriptBasic
|
||||
1969 1724698230321 XXXX 1724698230321, Thread 1969: XXXX 1724698230321, Entering Thread 1969: Commands::runScriptBasic with script contents. contents[0] = 0x46, ...
|
||||
1969 1724698230322 XXXX 1724698230322, Thread 1969: XXXX 1724698230322, Exiting Thread 1969: Commands::runScriptBasic
|
||||
1969 1724698230322 XXXX 1724698230322, Thread 1969: XXXX 1724698230322, Entering Thread 1969: Commands::runScriptBasic with script contents. contents[0] = 0x44, ...
|
||||
1969 1724698230334 XXXX 1724698230334, Thread 1969: XXXX 1724698230334, Exiting Thread 1969: Commands::runScriptBasic
|
||||
1969 1724698230334 XXXX 1724698230334, Thread 1969: XXXX 1724698230334, Entering Thread 1969: Commands::runScriptBasic with script contents. contents[0] = 0x40, ...
|
||||
1969 1724698230514 XXXX 1724698230514, Thread 1969: XXXX 1724698230514, Exiting Thread 1969: Commands::runScriptBasic
|
||||
1969 1724698230514 XXXX 1724698230514, Thread 1969: XXXX 1724698230514, Entering Thread 1969: Commands::runScriptBasic with script contents. contents[0] = 0x47, ...
|
||||
1969 1724698230519 XXXX 1724698230519, Thread 1969: XXXX 1724698230519, Exiting Thread 1969: Commands::runScriptBasic
|
||||
1969 1724698230519 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 Post:SetPowerInfo
|
||||
1969 1724698230519 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 Return Value
|
||||
1969 1724698230519 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 none
|
||||
1969 1724698230519 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 Return End
|
||||
|
||||
1969 1724698230519 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 Pre:SetLEDBrightness
|
||||
1969 1724698230519 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 Payload
|
||||
1969 1724698230519 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 5
|
||||
1969 1724698230519 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 Payload End
|
||||
1969 1724698230519 XXXX 1724698230519, Thread 1969: XXXX 1724698230519, Entering Thread 1969: Commands::runScriptBasic with script contents. contents[0] = 0xcf, ...
|
||||
1969 1724698230520 XXXX 1724698230520, Thread 1969: XXXX 1724698230520, Exiting Thread 1969: Commands::runScriptBasic
|
||||
1969 1724698230520 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 Post:SetLEDBrightness
|
||||
1969 1724698230520 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 Return Value
|
||||
1969 1724698230520 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 none
|
||||
1969 1724698230520 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 Return End
|
||||
|
||||
1969 1724698230520 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 Pre:SetToolInfo
|
||||
1969 1724698230520 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 Payload
|
||||
1969 1724698230520 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 ToolInfo: Values:
|
||||
1969 1724698230520 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 ToolInfo: speedLevel = 1, PGCResistance = 4700, PGDResistance = 4700, PGCPullDir = PullDown, PGDPullDir = PullDown, ICSPSelected = Wire2
|
||||
1969 1724698230520 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 Payload End
|
||||
1969 1724698230520 XXXX 1724698230520, Thread 1969: XXXX 1724698230520, Entering Thread 1969: Commands::runScriptBasic, script name = SetSpeed, timeOut = -1 ms
|
||||
1969 1724698230521 XXXX 1724698230521, Thread 1969: XXXX 1724698230521, Exiting Thread 1969: Commands::runScriptBasic
|
||||
1969 1724698230521 XXXX 1724698230521, Thread 1969: XXXX 1724698230521, Entering Thread 1969: Commands::runScriptBasic, script name = EnterProgMode, timeOut = -1 ms
|
||||
1969 1724698231032 XXXX 1724698231032, Thread 1969: XXXX 1724698231032, Exiting Thread 1969: Commands::runScriptBasic
|
||||
1969 1724698231032 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 Post:SetToolInfo
|
||||
1969 1724698231032 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 Return Value
|
||||
1969 1724698231032 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 none
|
||||
1969 1724698231032 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 Return End
|
||||
|
||||
1969 1724698231032 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 Pre:GetTargetIDInfo
|
||||
1969 1724698231032 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 Payload
|
||||
1969 1724698231032 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 null
|
||||
1969 1724698231032 GEN4_TO_CONTROLLER_LOG:GEN4_CONNECT_INT_LOG_ATtiny404 Payload End
|
||||
1969 1724698231034 XXXX 1724698231034, Thread 1969: XXXX 1724698231034, Entering Thread 1969: Commands::runScriptBasic, script name = EnterProgMode, timeOut = -1 ms
|
||||
1969 1724698231545 XXXX 1724698231545, Thread 1969: XXXX 1724698231545, Exiting Thread 1969: Commands::runScriptBasic
|
Binary file not shown.
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project>
|
||||
<executable name="dist/attiny404/production/Relay_Tester.production.elf">
|
||||
<memory name="program">
|
||||
<units>bytes</units>
|
||||
<length>4096</length>
|
||||
<used>784</used>
|
||||
<free>3312</free>
|
||||
</memory>
|
||||
<memory name="data">
|
||||
<units>bytes</units>
|
||||
<length>256</length>
|
||||
<used>2</used>
|
||||
<free>254</free>
|
||||
</memory>
|
||||
</executable>
|
||||
</project>
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project>
|
||||
<executable name="dist/default/debug/fg004a.X.debug.elf">
|
||||
<memory name="program">
|
||||
<units>bytes</units>
|
||||
<length>4096</length>
|
||||
<used>424</used>
|
||||
<free>3672</free>
|
||||
</memory>
|
||||
<memory name="data">
|
||||
<units>bytes</units>
|
||||
<length>256</length>
|
||||
<used>2</used>
|
||||
<free>254</free>
|
||||
</memory>
|
||||
</executable>
|
||||
</project>
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project>
|
||||
<executable name="dist/default/production/fg004a.X.production.elf">
|
||||
<memory name="program">
|
||||
<units>bytes</units>
|
||||
<length>4096</length>
|
||||
<used>1778</used>
|
||||
<free>2318</free>
|
||||
</memory>
|
||||
<memory name="data">
|
||||
<units>bytes</units>
|
||||
<length>256</length>
|
||||
<used>4</used>
|
||||
<free>252</free>
|
||||
</memory>
|
||||
</executable>
|
||||
</project>
|
|
@ -0,0 +1,71 @@
|
|||
/**
|
||||
* @brief Module/Interface for editing AVR registers
|
||||
* @details This file is an interface to AVR registers or the avr/io.h
|
||||
* @author Jake G
|
||||
* @date 2024
|
||||
* @copyright None
|
||||
* @file RegEdit.h
|
||||
*/
|
||||
|
||||
#ifndef REGEDIT_H
|
||||
#define REGEDIT_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
|
||||
/**
|
||||
* @brief Sets the value of the register to 0xFF.
|
||||
* @param reg A pointer to a register
|
||||
*/
|
||||
void RegEdit_SetRegister(void *reg);
|
||||
|
||||
/**
|
||||
* @brief Sets the value of the register to 0x00.
|
||||
* @param reg A pointer to a register
|
||||
*/
|
||||
void RegEdit_ClearRegister(void *reg);
|
||||
|
||||
/**
|
||||
* @brief Sets a single bit in the register.
|
||||
* @param reg A pointer to a register
|
||||
* @param The bit's index or number in the register
|
||||
*/
|
||||
void RegEdit_SetBit(void *reg, uint8_t bit_num);
|
||||
|
||||
/**
|
||||
* @brief Clears a single bit in the register.
|
||||
* @param reg A pointer to a register
|
||||
* @param The bit's index or number in the register
|
||||
*/
|
||||
void RegEdit_ClearBit(void *reg, uint8_t bit_num);
|
||||
|
||||
/**
|
||||
* @brief Checks if a single bit is set in the register.
|
||||
* @param reg A pointer to a register
|
||||
* @param The bit's index or number in the register
|
||||
*/
|
||||
bool RegEdit_IsBitSet(void *reg, uint8_t bit_num);
|
||||
|
||||
/**
|
||||
* @brief Preforms logical OR Equals with the passed num.
|
||||
* @param reg A pointer to a register
|
||||
* @param The bit's index or number in the register
|
||||
*/
|
||||
void RegEdit_OR_Num(void *reg, uint8_t num);
|
||||
|
||||
/**
|
||||
* @brief Preforms logical AND Equals with the passed num.
|
||||
* @param reg A pointer to a register
|
||||
* @param The bit's index or number in the register
|
||||
*/
|
||||
void RegEdit_AND_Num(void *reg, uint8_t num);
|
||||
|
||||
/**
|
||||
* @brief Sets the register to the passed number value.
|
||||
* @param reg A pointer to a register
|
||||
* @param The bit's index or number in the register
|
||||
*/
|
||||
void RegEdit_SetNum(void *reg, uint8_t num);
|
||||
|
||||
#endif //REGEDIT_H
|
|
@ -0,0 +1,60 @@
|
|||
/**
|
||||
* @file config.h
|
||||
* @author Jake G
|
||||
* @date 15 June 2024
|
||||
* @brief File contains the project configuration values
|
||||
*
|
||||
* This file contains the user changable parameters. Most the values are
|
||||
* constants that will change the behavior of the system.
|
||||
*
|
||||
* For these changes to take affect you must recompile/rebuild the project
|
||||
* after you have changed the values.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#define ADC_LOAD1 4
|
||||
#define ADC_LOAD2 5
|
||||
#define ADC_LOAD3 6
|
||||
|
||||
/**
|
||||
* @brief Positive Zero Crossing Trigger Value
|
||||
* The 10 bit value at which the program triggers the ISR to handle
|
||||
* the zero crossing event.
|
||||
*
|
||||
* You can adjust this to change when the program will start the timer.
|
||||
*/
|
||||
const uint16_t TriggerValue = 512;
|
||||
|
||||
|
||||
/**
|
||||
* @brief Triac Gate Pulse Quantity
|
||||
*
|
||||
* Contains the number of pulses that the micro-controller will send to the
|
||||
* gates of the triac.
|
||||
*
|
||||
* This number should match the quantity of timings inside the pulse/duration
|
||||
* array.
|
||||
*/
|
||||
const int GatePulsesQty = 5;
|
||||
|
||||
/**
|
||||
* @brief Gate Pulses Array
|
||||
*
|
||||
* The gate pulses array holds the duration of pulses in microseconds for the
|
||||
* triacs gates. The length of the array must be matched with the
|
||||
* GatePulsesQuantity parameter.
|
||||
*/
|
||||
const uint16_t GatePulses[5] = {250, 500, 750, 1000, 1250};
|
||||
|
||||
/**
|
||||
* @brief The time constant.
|
||||
*/
|
||||
const double Tau = 8250;
|
||||
|
||||
|
||||
|
||||
#endif //CONFIG_H
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,49 @@
|
|||
/**
|
||||
* @file zero_cross_detection.h
|
||||
* @author Jake G
|
||||
* @date 16 June 2024
|
||||
* @brief File contains the zero cross detection functions
|
||||
*
|
||||
* This file holds all the code/functions needed to read the value of the AC
|
||||
* waveform. It uses the trigger value from the `config.h` file to evaluate the
|
||||
* state.
|
||||
*
|
||||
* This module depends on the ADC.h module to get readings from the ADC
|
||||
* hardware.
|
||||
*/
|
||||
|
||||
#ifndef ZERO_CROSS_DETECTION
|
||||
#define ZERO_CROSS_DETECTION
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
/**
|
||||
* @brief Zero Cross Detection Setup
|
||||
*
|
||||
* Sets up the hardware to read the values coming from the AC input waveform.
|
||||
*
|
||||
*/
|
||||
void ZCD_Setup(void);
|
||||
//int ZCD_Setup(volatile uint8_t *ddrx, uint8_t *port, uint8_t pin);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Checks if ZCD should trigger on value
|
||||
*
|
||||
* The function checks for a positive edge first using the ZCD_IsPositiveEdge
|
||||
* function. If a positive edge was found, then it takes an addition set of
|
||||
* samples and averages them; only triggering(returning true) in the case
|
||||
* that the average is higher than the previous sample.
|
||||
*/
|
||||
bool ZCD_IsTriggered(void);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Function blocks execution until ZCD is triggered.
|
||||
*
|
||||
*/
|
||||
void ZCD_Poll(void);
|
||||
|
||||
|
||||
#endif //ZERO_CROSS_DETECTION
|
|
@ -0,0 +1,4 @@
|
|||
add_subdirectory(MockRegEdit)
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
add_library(MockRegEdit STATIC
|
||||
MockRegEdit.c
|
||||
)
|
||||
|
||||
target_include_directories(MockRegEdit PUBLIC
|
||||
${CMAKE_CURRENT_LIST_DIR}
|
||||
)
|
||||
|
||||
target_link_libraries(MockRegEdit
|
||||
${CPPUTEST_LIBRARIES}/libCppUTest.a
|
||||
${CPPUTEST_LIBRARIES}/libCppUTestExt.a
|
||||
)
|
|
@ -0,0 +1,85 @@
|
|||
/*
|
||||
* Author: username
|
||||
* Date: 2024
|
||||
* filename: MockRegEdit.c
|
||||
* description: module_purpose
|
||||
*/
|
||||
|
||||
#include "MockRegEdit.h"
|
||||
#include "CppUTestExt/MockSupport_c.h"
|
||||
|
||||
|
||||
void RegEdit_SetRegister(void *reg)
|
||||
{
|
||||
mock_c()->actualCall("RegEdit_SetRegister")
|
||||
->withPointerParameters("reg", reg);
|
||||
}
|
||||
|
||||
void RegEdit_ClearRegister(void *reg)
|
||||
{
|
||||
mock_c()->actualCall("RegEdit_ClearRegister")
|
||||
->withPointerParameters("reg", reg);
|
||||
}
|
||||
|
||||
|
||||
void RegEdit_SetBit(void *reg, uint8_t bit_num)
|
||||
{
|
||||
mock_c()->actualCall("RegEdit_SetBit")
|
||||
->withPointerParameters("reg", reg)
|
||||
->withUnsignedIntParameters("bit_num", bit_num);
|
||||
}
|
||||
|
||||
|
||||
void RegEdit_ClearBit(void *reg, uint8_t bit_num)
|
||||
{
|
||||
mock_c()->actualCall("RegEdit_ClearBit")
|
||||
->withPointerParameters("reg", reg)
|
||||
->withUnsignedIntParameters("bit_num", bit_num);
|
||||
}
|
||||
|
||||
|
||||
bool RegEdit_IsBitSet(void *reg, uint8_t bit_num)
|
||||
{
|
||||
|
||||
return mock_c()->actualCall("RegEdit_IsBitSet")
|
||||
->withPointerParameters("reg", reg)
|
||||
->withUnsignedIntParameters("bit_num", bit_num)
|
||||
->returnBoolValueOrDefault(true);
|
||||
//return mock_c()->returnBoolValueOrDefault(true);
|
||||
}
|
||||
|
||||
void RegEdit_OR_Num(void *reg, uint8_t num)
|
||||
{
|
||||
mock_c()->actualCall("RegEdit_OR_Num")
|
||||
->withPointerParameters("reg", reg)
|
||||
->withUnsignedIntParameters("num", num);
|
||||
}
|
||||
|
||||
|
||||
void RegEdit_AND_Num(void *reg, uint8_t num)
|
||||
{
|
||||
mock_c()->actualCall("RegEdit_AND_Num")
|
||||
->withPointerParameters("reg", reg)
|
||||
->withUnsignedIntParameters("num", num);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void RegEdit_SetNum(void *reg, uint8_t num)
|
||||
{
|
||||
mock_c()->actualCall("RegEdit_SetNum")
|
||||
->withPointerParameters("reg", reg)
|
||||
->withUnsignedIntParameters("num", num);
|
||||
}
|
||||
|
||||
|
||||
uint8_t RegEdit_ReadReg(void *reg)
|
||||
{
|
||||
uint8_t value = *(uint8_t *)reg;
|
||||
|
||||
mock_c()->actualCall("RegEdit_ReadReg")
|
||||
->withPointerParameters("reg", reg)
|
||||
->returnUnsignedIntValueOrDefault(value);
|
||||
|
||||
return value;
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
/**
|
||||
* @brief PUT_TEXT_HERE
|
||||
* @details This file is...
|
||||
* @author username
|
||||
* @date todays_date
|
||||
* @copyright None
|
||||
* @file MockRegEdit.h
|
||||
*/
|
||||
|
||||
#ifndef MOCKREGEDIT_H
|
||||
#define MOCKREGEDIT_H
|
||||
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
void RegEdit_SetRegister(void *reg);
|
||||
void RegEdit_ClearRegister(void *reg);
|
||||
void RegEdit_SetBit(void *reg, uint8_t bit_num);
|
||||
void RegEdit_ClearBit(void *reg, uint8_t bit_num);
|
||||
bool RegEdit_IsBitSet(void *reg, uint8_t bit_num);
|
||||
|
||||
void RegEdit_OR_Num(void *reg, uint8_t num);
|
||||
void RegEdit_AND_Num(void *reg, uint8_t num);
|
||||
|
||||
void RegEdit_SetNum(void *reg, uint8_t num);
|
||||
|
||||
uint8_t RegEdit_ReadReg(void *reg);
|
||||
|
||||
#endif //MOCKREGEDIT_H
|
|
@ -0,0 +1,51 @@
|
|||
#include "u8_comparator.hpp"
|
||||
#include "CppUTest/SimpleString.h"
|
||||
|
||||
/*
|
||||
class MyTypeComparator : public MockNamedValueComparator
|
||||
{
|
||||
public:
|
||||
virtual bool isEqual(const void* object1, const void* object2)
|
||||
{
|
||||
return object1 == object2;
|
||||
}
|
||||
virtual SimpleString valueToString(const void* object)
|
||||
{
|
||||
return StringFrom(object);
|
||||
}
|
||||
};
|
||||
*/
|
||||
|
||||
bool UInt8PointerComparator::isEqual(const void* object1, const void* object2) {
|
||||
const uint8_t* ptr1 = reinterpret_cast<const uint8_t*>(object1);
|
||||
const uint8_t* ptr2 = reinterpret_cast<const uint8_t*>(object2);
|
||||
return std::memcmp(ptr1, ptr2, sizeof(uint8_t)) == 0;
|
||||
}
|
||||
|
||||
SimpleString UInt8PointerComparator::valueToString(const void* object) {
|
||||
const uint8_t* ptr = reinterpret_cast<const uint8_t*>(object);
|
||||
return StringFromFormat("0x%02x", *ptr);
|
||||
}
|
||||
|
||||
/*
|
||||
bool UInt8PointerComparator::isEqual(const void* object1, const void* object2) const {
|
||||
const uint8_t* ptr1 = static_cast<const uint8_t*>(object1);
|
||||
const uint8_t* ptr2 = static_cast<const uint8_t*>(object2);
|
||||
return std::memcmp(ptr1, ptr2, sizeof(uint8_t)) == 0;
|
||||
}
|
||||
|
||||
SimpleString UInt8PointerComparator::valueToString(const void* object) const {
|
||||
const uint8_t* ptr = static_cast<const uint8_t*>(object);
|
||||
return StringFromFormat("0x%02x", *ptr);
|
||||
}
|
||||
*/
|
||||
|
||||
bool UInt8Comparator::isEqual(const void* object1, const void* object2) {
|
||||
return (uint8_t*)object1 == (uint8_t *)object2;
|
||||
}
|
||||
|
||||
SimpleString UInt8Comparator::valueToString(const void* object) {
|
||||
//uint8_t value = reinterpret_cast<uint8_t>(object);
|
||||
const uint8_t *ptr = reinterpret_cast<const uint8_t*>(object);
|
||||
return StringFromFormat("0x%02x", *ptr);
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
#ifndef U8_COMPARATOR_H
|
||||
#define U8_COMPARATOR_H
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <CppUTestExt/MockSupport.h>
|
||||
|
||||
class UInt8PointerComparator : public MockNamedValueComparator {
|
||||
public:
|
||||
virtual bool isEqual(const void* object1, const void* object2) override;
|
||||
SimpleString valueToString(const void* object) override;
|
||||
};
|
||||
|
||||
class UInt8Comparator : public MockNamedValueComparator {
|
||||
public:
|
||||
virtual bool isEqual(const void* object1, const void* object2) override;
|
||||
SimpleString valueToString(const void* object) override;
|
||||
};
|
||||
|
||||
#endif //U8_COMPARATOR_H
|
|
@ -0,0 +1,202 @@
|
|||
#
|
||||
# Generated Makefile - do not edit!
|
||||
#
|
||||
# Edit the Makefile in the project folder instead (../Makefile). Each target
|
||||
# has a -pre and a -post target defined where you can add customized code.
|
||||
#
|
||||
# This makefile implements configuration specific macros and targets.
|
||||
|
||||
|
||||
# Include project Makefile
|
||||
ifeq "${IGNORE_LOCAL}" "TRUE"
|
||||
# do not include local makefile. User is passing all local related variables already
|
||||
else
|
||||
include Makefile
|
||||
# Include makefile containing local settings
|
||||
ifeq "$(wildcard nbproject/Makefile-local-attiny404.mk)" "nbproject/Makefile-local-attiny404.mk"
|
||||
include nbproject/Makefile-local-attiny404.mk
|
||||
endif
|
||||
endif
|
||||
|
||||
# Environment
|
||||
MKDIR=mkdir -p
|
||||
RM=rm -f
|
||||
MV=mv
|
||||
CP=cp
|
||||
|
||||
# Macros
|
||||
CND_CONF=attiny404
|
||||
ifeq ($(TYPE_IMAGE), DEBUG_RUN)
|
||||
IMAGE_TYPE=debug
|
||||
OUTPUT_SUFFIX=elf
|
||||
DEBUGGABLE_SUFFIX=elf
|
||||
FINAL_IMAGE=${DISTDIR}/Relay_Tester.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
|
||||
else
|
||||
IMAGE_TYPE=production
|
||||
OUTPUT_SUFFIX=hex
|
||||
DEBUGGABLE_SUFFIX=elf
|
||||
FINAL_IMAGE=${DISTDIR}/Relay_Tester.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
|
||||
endif
|
||||
|
||||
ifeq ($(COMPARE_BUILD), true)
|
||||
COMPARISON_BUILD=-mafrlcsj
|
||||
else
|
||||
COMPARISON_BUILD=
|
||||
endif
|
||||
|
||||
# Object Directory
|
||||
OBJECTDIR=build/${CND_CONF}/${IMAGE_TYPE}
|
||||
|
||||
# Distribution Directory
|
||||
DISTDIR=dist/${CND_CONF}/${IMAGE_TYPE}
|
||||
|
||||
# Source Files Quoted if spaced
|
||||
SOURCEFILES_QUOTED_IF_SPACED=src/main.c src/RegEdit/RegEdit.c src/usart/usart.c src/timer/timer.c src/LedController/LedController.c
|
||||
|
||||
# Object Files Quoted if spaced
|
||||
OBJECTFILES_QUOTED_IF_SPACED=${OBJECTDIR}/src/main.o ${OBJECTDIR}/src/RegEdit/RegEdit.o ${OBJECTDIR}/src/usart/usart.o ${OBJECTDIR}/src/timer/timer.o ${OBJECTDIR}/src/LedController/LedController.o
|
||||
POSSIBLE_DEPFILES=${OBJECTDIR}/src/main.o.d ${OBJECTDIR}/src/RegEdit/RegEdit.o.d ${OBJECTDIR}/src/usart/usart.o.d ${OBJECTDIR}/src/timer/timer.o.d ${OBJECTDIR}/src/LedController/LedController.o.d
|
||||
|
||||
# Object Files
|
||||
OBJECTFILES=${OBJECTDIR}/src/main.o ${OBJECTDIR}/src/RegEdit/RegEdit.o ${OBJECTDIR}/src/usart/usart.o ${OBJECTDIR}/src/timer/timer.o ${OBJECTDIR}/src/LedController/LedController.o
|
||||
|
||||
# Source Files
|
||||
SOURCEFILES=src/main.c src/RegEdit/RegEdit.c src/usart/usart.c src/timer/timer.c src/LedController/LedController.c
|
||||
|
||||
|
||||
|
||||
CFLAGS=
|
||||
ASFLAGS=
|
||||
LDLIBSOPTIONS=
|
||||
|
||||
############# Tool locations ##########################################
|
||||
# If you copy a project from one host to another, the path where the #
|
||||
# compiler is installed may be different. #
|
||||
# If you open this project with MPLAB X in the new host, this #
|
||||
# makefile will be regenerated and the paths will be corrected. #
|
||||
#######################################################################
|
||||
# fixDeps replaces a bunch of sed/cat/printf statements that slow down the build
|
||||
FIXDEPS=fixDeps
|
||||
|
||||
.build-conf: ${BUILD_SUBPROJECTS}
|
||||
ifneq ($(INFORMATION_MESSAGE), )
|
||||
@echo $(INFORMATION_MESSAGE)
|
||||
endif
|
||||
${MAKE} -f nbproject/Makefile-attiny404.mk ${DISTDIR}/Relay_Tester.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
|
||||
|
||||
MP_PROCESSOR_OPTION=ATtiny404
|
||||
# ------------------------------------------------------------------------------------
|
||||
# Rules for buildStep: compile
|
||||
ifeq ($(TYPE_IMAGE), DEBUG_RUN)
|
||||
${OBJECTDIR}/src/main.o: src/main.c .generated_files/flags/attiny404/fa73280ab5c751ec6af1e867ba2ca1963f225032 .generated_files/flags/attiny404/da39a3ee5e6b4b0d3255bfef95601890afd80709
|
||||
@${MKDIR} "${OBJECTDIR}/src"
|
||||
@${RM} ${OBJECTDIR}/src/main.o.d
|
||||
@${RM} ${OBJECTDIR}/src/main.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -D__DEBUG=1 -g -DDEBUG -gdwarf-2 -x c -D__$(MP_PROCESSOR_OPTION)__ -mdfp="${DFP_DIR}/xc8" -Wl,--gc-sections -O1 -ffunction-sections -fdata-sections -fshort-enums -fno-common -funsigned-char -funsigned-bitfields -I"src/RegEdit" -I"src/usart" -I"inc" -I"src/timer" -I"src/LedController" -Wall -DXPRJ_attiny404=$(CND_CONF) $(COMPARISON_BUILD) -gdwarf-3 -mno-const-data-in-progmem -MD -MP -MF "${OBJECTDIR}/src/main.o.d" -MT "${OBJECTDIR}/src/main.o.d" -MT ${OBJECTDIR}/src/main.o -o ${OBJECTDIR}/src/main.o src/main.c
|
||||
|
||||
${OBJECTDIR}/src/RegEdit/RegEdit.o: src/RegEdit/RegEdit.c .generated_files/flags/attiny404/f1028cc7904ca5b9159231969b0f7ada47916d51 .generated_files/flags/attiny404/da39a3ee5e6b4b0d3255bfef95601890afd80709
|
||||
@${MKDIR} "${OBJECTDIR}/src/RegEdit"
|
||||
@${RM} ${OBJECTDIR}/src/RegEdit/RegEdit.o.d
|
||||
@${RM} ${OBJECTDIR}/src/RegEdit/RegEdit.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -D__DEBUG=1 -g -DDEBUG -gdwarf-2 -x c -D__$(MP_PROCESSOR_OPTION)__ -mdfp="${DFP_DIR}/xc8" -Wl,--gc-sections -O1 -ffunction-sections -fdata-sections -fshort-enums -fno-common -funsigned-char -funsigned-bitfields -I"src/RegEdit" -I"src/usart" -I"inc" -I"src/timer" -I"src/LedController" -Wall -DXPRJ_attiny404=$(CND_CONF) $(COMPARISON_BUILD) -gdwarf-3 -mno-const-data-in-progmem -MD -MP -MF "${OBJECTDIR}/src/RegEdit/RegEdit.o.d" -MT "${OBJECTDIR}/src/RegEdit/RegEdit.o.d" -MT ${OBJECTDIR}/src/RegEdit/RegEdit.o -o ${OBJECTDIR}/src/RegEdit/RegEdit.o src/RegEdit/RegEdit.c
|
||||
|
||||
${OBJECTDIR}/src/usart/usart.o: src/usart/usart.c .generated_files/flags/attiny404/5817417095ee90b3772093983d64af5583ba17d9 .generated_files/flags/attiny404/da39a3ee5e6b4b0d3255bfef95601890afd80709
|
||||
@${MKDIR} "${OBJECTDIR}/src/usart"
|
||||
@${RM} ${OBJECTDIR}/src/usart/usart.o.d
|
||||
@${RM} ${OBJECTDIR}/src/usart/usart.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -D__DEBUG=1 -g -DDEBUG -gdwarf-2 -x c -D__$(MP_PROCESSOR_OPTION)__ -mdfp="${DFP_DIR}/xc8" -Wl,--gc-sections -O1 -ffunction-sections -fdata-sections -fshort-enums -fno-common -funsigned-char -funsigned-bitfields -I"src/RegEdit" -I"src/usart" -I"inc" -I"src/timer" -I"src/LedController" -Wall -DXPRJ_attiny404=$(CND_CONF) $(COMPARISON_BUILD) -gdwarf-3 -mno-const-data-in-progmem -MD -MP -MF "${OBJECTDIR}/src/usart/usart.o.d" -MT "${OBJECTDIR}/src/usart/usart.o.d" -MT ${OBJECTDIR}/src/usart/usart.o -o ${OBJECTDIR}/src/usart/usart.o src/usart/usart.c
|
||||
|
||||
${OBJECTDIR}/src/timer/timer.o: src/timer/timer.c .generated_files/flags/attiny404/531278ccb10cb2635ffd5346f85461fc0d204d43 .generated_files/flags/attiny404/da39a3ee5e6b4b0d3255bfef95601890afd80709
|
||||
@${MKDIR} "${OBJECTDIR}/src/timer"
|
||||
@${RM} ${OBJECTDIR}/src/timer/timer.o.d
|
||||
@${RM} ${OBJECTDIR}/src/timer/timer.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -D__DEBUG=1 -g -DDEBUG -gdwarf-2 -x c -D__$(MP_PROCESSOR_OPTION)__ -mdfp="${DFP_DIR}/xc8" -Wl,--gc-sections -O1 -ffunction-sections -fdata-sections -fshort-enums -fno-common -funsigned-char -funsigned-bitfields -I"src/RegEdit" -I"src/usart" -I"inc" -I"src/timer" -I"src/LedController" -Wall -DXPRJ_attiny404=$(CND_CONF) $(COMPARISON_BUILD) -gdwarf-3 -mno-const-data-in-progmem -MD -MP -MF "${OBJECTDIR}/src/timer/timer.o.d" -MT "${OBJECTDIR}/src/timer/timer.o.d" -MT ${OBJECTDIR}/src/timer/timer.o -o ${OBJECTDIR}/src/timer/timer.o src/timer/timer.c
|
||||
|
||||
${OBJECTDIR}/src/LedController/LedController.o: src/LedController/LedController.c .generated_files/flags/attiny404/e5833ed4bfab6fc1888677874b82093a64e3627 .generated_files/flags/attiny404/da39a3ee5e6b4b0d3255bfef95601890afd80709
|
||||
@${MKDIR} "${OBJECTDIR}/src/LedController"
|
||||
@${RM} ${OBJECTDIR}/src/LedController/LedController.o.d
|
||||
@${RM} ${OBJECTDIR}/src/LedController/LedController.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -D__DEBUG=1 -g -DDEBUG -gdwarf-2 -x c -D__$(MP_PROCESSOR_OPTION)__ -mdfp="${DFP_DIR}/xc8" -Wl,--gc-sections -O1 -ffunction-sections -fdata-sections -fshort-enums -fno-common -funsigned-char -funsigned-bitfields -I"src/RegEdit" -I"src/usart" -I"inc" -I"src/timer" -I"src/LedController" -Wall -DXPRJ_attiny404=$(CND_CONF) $(COMPARISON_BUILD) -gdwarf-3 -mno-const-data-in-progmem -MD -MP -MF "${OBJECTDIR}/src/LedController/LedController.o.d" -MT "${OBJECTDIR}/src/LedController/LedController.o.d" -MT ${OBJECTDIR}/src/LedController/LedController.o -o ${OBJECTDIR}/src/LedController/LedController.o src/LedController/LedController.c
|
||||
|
||||
else
|
||||
${OBJECTDIR}/src/main.o: src/main.c .generated_files/flags/attiny404/5fd051d6a3fd92bb1802b9adc043a7d1f28ddda1 .generated_files/flags/attiny404/da39a3ee5e6b4b0d3255bfef95601890afd80709
|
||||
@${MKDIR} "${OBJECTDIR}/src"
|
||||
@${RM} ${OBJECTDIR}/src/main.o.d
|
||||
@${RM} ${OBJECTDIR}/src/main.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -x c -D__$(MP_PROCESSOR_OPTION)__ -mdfp="${DFP_DIR}/xc8" -Wl,--gc-sections -O1 -ffunction-sections -fdata-sections -fshort-enums -fno-common -funsigned-char -funsigned-bitfields -I"src/RegEdit" -I"src/usart" -I"inc" -I"src/timer" -I"src/LedController" -Wall -DXPRJ_attiny404=$(CND_CONF) $(COMPARISON_BUILD) -gdwarf-3 -mno-const-data-in-progmem -MD -MP -MF "${OBJECTDIR}/src/main.o.d" -MT "${OBJECTDIR}/src/main.o.d" -MT ${OBJECTDIR}/src/main.o -o ${OBJECTDIR}/src/main.o src/main.c
|
||||
|
||||
${OBJECTDIR}/src/RegEdit/RegEdit.o: src/RegEdit/RegEdit.c .generated_files/flags/attiny404/165022dc8e1e49b4bb590dc119cbd48dfa74dcd .generated_files/flags/attiny404/da39a3ee5e6b4b0d3255bfef95601890afd80709
|
||||
@${MKDIR} "${OBJECTDIR}/src/RegEdit"
|
||||
@${RM} ${OBJECTDIR}/src/RegEdit/RegEdit.o.d
|
||||
@${RM} ${OBJECTDIR}/src/RegEdit/RegEdit.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -x c -D__$(MP_PROCESSOR_OPTION)__ -mdfp="${DFP_DIR}/xc8" -Wl,--gc-sections -O1 -ffunction-sections -fdata-sections -fshort-enums -fno-common -funsigned-char -funsigned-bitfields -I"src/RegEdit" -I"src/usart" -I"inc" -I"src/timer" -I"src/LedController" -Wall -DXPRJ_attiny404=$(CND_CONF) $(COMPARISON_BUILD) -gdwarf-3 -mno-const-data-in-progmem -MD -MP -MF "${OBJECTDIR}/src/RegEdit/RegEdit.o.d" -MT "${OBJECTDIR}/src/RegEdit/RegEdit.o.d" -MT ${OBJECTDIR}/src/RegEdit/RegEdit.o -o ${OBJECTDIR}/src/RegEdit/RegEdit.o src/RegEdit/RegEdit.c
|
||||
|
||||
${OBJECTDIR}/src/usart/usart.o: src/usart/usart.c .generated_files/flags/attiny404/adb78bad2bf6c6e7b6bc725940fdbd35cd7e6aa6 .generated_files/flags/attiny404/da39a3ee5e6b4b0d3255bfef95601890afd80709
|
||||
@${MKDIR} "${OBJECTDIR}/src/usart"
|
||||
@${RM} ${OBJECTDIR}/src/usart/usart.o.d
|
||||
@${RM} ${OBJECTDIR}/src/usart/usart.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -x c -D__$(MP_PROCESSOR_OPTION)__ -mdfp="${DFP_DIR}/xc8" -Wl,--gc-sections -O1 -ffunction-sections -fdata-sections -fshort-enums -fno-common -funsigned-char -funsigned-bitfields -I"src/RegEdit" -I"src/usart" -I"inc" -I"src/timer" -I"src/LedController" -Wall -DXPRJ_attiny404=$(CND_CONF) $(COMPARISON_BUILD) -gdwarf-3 -mno-const-data-in-progmem -MD -MP -MF "${OBJECTDIR}/src/usart/usart.o.d" -MT "${OBJECTDIR}/src/usart/usart.o.d" -MT ${OBJECTDIR}/src/usart/usart.o -o ${OBJECTDIR}/src/usart/usart.o src/usart/usart.c
|
||||
|
||||
${OBJECTDIR}/src/timer/timer.o: src/timer/timer.c .generated_files/flags/attiny404/cc56a7bc0edc1617e859cf1cd41630662cdc0fb0 .generated_files/flags/attiny404/da39a3ee5e6b4b0d3255bfef95601890afd80709
|
||||
@${MKDIR} "${OBJECTDIR}/src/timer"
|
||||
@${RM} ${OBJECTDIR}/src/timer/timer.o.d
|
||||
@${RM} ${OBJECTDIR}/src/timer/timer.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -x c -D__$(MP_PROCESSOR_OPTION)__ -mdfp="${DFP_DIR}/xc8" -Wl,--gc-sections -O1 -ffunction-sections -fdata-sections -fshort-enums -fno-common -funsigned-char -funsigned-bitfields -I"src/RegEdit" -I"src/usart" -I"inc" -I"src/timer" -I"src/LedController" -Wall -DXPRJ_attiny404=$(CND_CONF) $(COMPARISON_BUILD) -gdwarf-3 -mno-const-data-in-progmem -MD -MP -MF "${OBJECTDIR}/src/timer/timer.o.d" -MT "${OBJECTDIR}/src/timer/timer.o.d" -MT ${OBJECTDIR}/src/timer/timer.o -o ${OBJECTDIR}/src/timer/timer.o src/timer/timer.c
|
||||
|
||||
${OBJECTDIR}/src/LedController/LedController.o: src/LedController/LedController.c .generated_files/flags/attiny404/9b6572921ed13d88d6be9b7a24c4d781ce5b16ee .generated_files/flags/attiny404/da39a3ee5e6b4b0d3255bfef95601890afd80709
|
||||
@${MKDIR} "${OBJECTDIR}/src/LedController"
|
||||
@${RM} ${OBJECTDIR}/src/LedController/LedController.o.d
|
||||
@${RM} ${OBJECTDIR}/src/LedController/LedController.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -x c -D__$(MP_PROCESSOR_OPTION)__ -mdfp="${DFP_DIR}/xc8" -Wl,--gc-sections -O1 -ffunction-sections -fdata-sections -fshort-enums -fno-common -funsigned-char -funsigned-bitfields -I"src/RegEdit" -I"src/usart" -I"inc" -I"src/timer" -I"src/LedController" -Wall -DXPRJ_attiny404=$(CND_CONF) $(COMPARISON_BUILD) -gdwarf-3 -mno-const-data-in-progmem -MD -MP -MF "${OBJECTDIR}/src/LedController/LedController.o.d" -MT "${OBJECTDIR}/src/LedController/LedController.o.d" -MT ${OBJECTDIR}/src/LedController/LedController.o -o ${OBJECTDIR}/src/LedController/LedController.o src/LedController/LedController.c
|
||||
|
||||
endif
|
||||
|
||||
# ------------------------------------------------------------------------------------
|
||||
# Rules for buildStep: assemble
|
||||
ifeq ($(TYPE_IMAGE), DEBUG_RUN)
|
||||
else
|
||||
endif
|
||||
|
||||
# ------------------------------------------------------------------------------------
|
||||
# Rules for buildStep: assembleWithPreprocess
|
||||
ifeq ($(TYPE_IMAGE), DEBUG_RUN)
|
||||
else
|
||||
endif
|
||||
|
||||
# ------------------------------------------------------------------------------------
|
||||
# Rules for buildStep: link
|
||||
ifeq ($(TYPE_IMAGE), DEBUG_RUN)
|
||||
${DISTDIR}/Relay_Tester.${IMAGE_TYPE}.${OUTPUT_SUFFIX}: ${OBJECTFILES} nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} ${DISTDIR}
|
||||
${MP_CC} $(MP_EXTRA_LD_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -Wl,-Map=${DISTDIR}/Relay_Tester.${IMAGE_TYPE}.map -D__DEBUG=1 -DXPRJ_attiny404=$(CND_CONF) -Wl,--defsym=__MPLAB_BUILD=1 -mdfp="${DFP_DIR}/xc8" -gdwarf-2 -Wl,--gc-sections -O1 -ffunction-sections -fdata-sections -fshort-enums -fno-common -funsigned-char -funsigned-bitfields -I"src/RegEdit" -I"src/usart" -I"inc" -I"src/timer" -I"src/LedController" -Wall -gdwarf-3 -mno-const-data-in-progmem $(COMPARISON_BUILD) -Wl,--memorysummary,${DISTDIR}/memoryfile.xml -o ${DISTDIR}/Relay_Tester.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} -o ${DISTDIR}/Relay_Tester.${IMAGE_TYPE}.${OUTPUT_SUFFIX} ${OBJECTFILES_QUOTED_IF_SPACED} -Wl,--start-group -Wl,-lm -Wl,--end-group -Wl,--defsym=__MPLAB_DEBUG=1,--defsym=__DEBUG=1
|
||||
@${RM} ${DISTDIR}/Relay_Tester.${IMAGE_TYPE}.hex
|
||||
|
||||
|
||||
else
|
||||
${DISTDIR}/Relay_Tester.${IMAGE_TYPE}.${OUTPUT_SUFFIX}: ${OBJECTFILES} nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} ${DISTDIR}
|
||||
${MP_CC} $(MP_EXTRA_LD_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -Wl,-Map=${DISTDIR}/Relay_Tester.${IMAGE_TYPE}.map -DXPRJ_attiny404=$(CND_CONF) -Wl,--defsym=__MPLAB_BUILD=1 -mdfp="${DFP_DIR}/xc8" -Wl,--gc-sections -O1 -ffunction-sections -fdata-sections -fshort-enums -fno-common -funsigned-char -funsigned-bitfields -I"src/RegEdit" -I"src/usart" -I"inc" -I"src/timer" -I"src/LedController" -Wall -gdwarf-3 -mno-const-data-in-progmem $(COMPARISON_BUILD) -Wl,--memorysummary,${DISTDIR}/memoryfile.xml -o ${DISTDIR}/Relay_Tester.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} -o ${DISTDIR}/Relay_Tester.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} ${OBJECTFILES_QUOTED_IF_SPACED} -Wl,--start-group -Wl,-lm -Wl,--end-group
|
||||
${MP_CC_DIR}/avr-objcopy -O ihex "${DISTDIR}/Relay_Tester.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX}" "${DISTDIR}/Relay_Tester.${IMAGE_TYPE}.hex"
|
||||
|
||||
endif
|
||||
|
||||
|
||||
# Subprojects
|
||||
.build-subprojects:
|
||||
|
||||
|
||||
# Subprojects
|
||||
.clean-subprojects:
|
||||
|
||||
# Clean Targets
|
||||
.clean-conf: ${CLEAN_SUBPROJECTS}
|
||||
${RM} -r ${OBJECTDIR}
|
||||
${RM} -r ${DISTDIR}
|
||||
|
||||
# Enable dependency checking
|
||||
.dep.inc: .depcheck-impl
|
||||
|
||||
DEPFILES=$(wildcard ${POSSIBLE_DEPFILES})
|
||||
ifneq (${DEPFILES},)
|
||||
include ${DEPFILES}
|
||||
endif
|
|
@ -0,0 +1,219 @@
|
|||
#
|
||||
# Generated Makefile - do not edit!
|
||||
#
|
||||
# Edit the Makefile in the project folder instead (../Makefile). Each target
|
||||
# has a -pre and a -post target defined where you can add customized code.
|
||||
#
|
||||
# This makefile implements configuration specific macros and targets.
|
||||
|
||||
|
||||
# Include project Makefile
|
||||
ifeq "${IGNORE_LOCAL}" "TRUE"
|
||||
# do not include local makefile. User is passing all local related variables already
|
||||
else
|
||||
include Makefile
|
||||
# Include makefile containing local settings
|
||||
ifeq "$(wildcard nbproject/Makefile-local-default.mk)" "nbproject/Makefile-local-default.mk"
|
||||
include nbproject/Makefile-local-default.mk
|
||||
endif
|
||||
endif
|
||||
|
||||
# Environment
|
||||
MKDIR=gnumkdir -p
|
||||
RM=rm -f
|
||||
MV=mv
|
||||
CP=cp
|
||||
|
||||
# Macros
|
||||
CND_CONF=default
|
||||
ifeq ($(TYPE_IMAGE), DEBUG_RUN)
|
||||
IMAGE_TYPE=debug
|
||||
OUTPUT_SUFFIX=elf
|
||||
DEBUGGABLE_SUFFIX=elf
|
||||
FINAL_IMAGE=${DISTDIR}/fg004a.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
|
||||
else
|
||||
IMAGE_TYPE=production
|
||||
OUTPUT_SUFFIX=hex
|
||||
DEBUGGABLE_SUFFIX=elf
|
||||
FINAL_IMAGE=${DISTDIR}/fg004a.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
|
||||
endif
|
||||
|
||||
ifeq ($(COMPARE_BUILD), true)
|
||||
COMPARISON_BUILD=
|
||||
else
|
||||
COMPARISON_BUILD=
|
||||
endif
|
||||
|
||||
# Object Directory
|
||||
OBJECTDIR=build/${CND_CONF}/${IMAGE_TYPE}
|
||||
|
||||
# Distribution Directory
|
||||
DISTDIR=dist/${CND_CONF}/${IMAGE_TYPE}
|
||||
|
||||
# Source Files Quoted if spaced
|
||||
SOURCEFILES_QUOTED_IF_SPACED=main.c ADC.c RegEdit.c TriacOut.c zero_cross_detection.c
|
||||
|
||||
# Object Files Quoted if spaced
|
||||
OBJECTFILES_QUOTED_IF_SPACED=${OBJECTDIR}/main.o ${OBJECTDIR}/ADC.o ${OBJECTDIR}/RegEdit.o ${OBJECTDIR}/TriacOut.o ${OBJECTDIR}/zero_cross_detection.o
|
||||
POSSIBLE_DEPFILES=${OBJECTDIR}/main.o.d ${OBJECTDIR}/ADC.o.d ${OBJECTDIR}/RegEdit.o.d ${OBJECTDIR}/TriacOut.o.d ${OBJECTDIR}/zero_cross_detection.o.d
|
||||
|
||||
# Object Files
|
||||
OBJECTFILES=${OBJECTDIR}/main.o ${OBJECTDIR}/ADC.o ${OBJECTDIR}/RegEdit.o ${OBJECTDIR}/TriacOut.o ${OBJECTDIR}/zero_cross_detection.o
|
||||
|
||||
# Source Files
|
||||
SOURCEFILES=main.c ADC.c RegEdit.c TriacOut.c zero_cross_detection.c
|
||||
|
||||
# Pack Options
|
||||
PACK_COMPILER_OPTIONS=-I "${DFP_DIR}/include"
|
||||
PACK_COMMON_OPTIONS=-B "${DFP_DIR}/gcc/dev/attiny404"
|
||||
|
||||
|
||||
|
||||
CFLAGS=
|
||||
ASFLAGS=
|
||||
LDLIBSOPTIONS=
|
||||
|
||||
############# Tool locations ##########################################
|
||||
# If you copy a project from one host to another, the path where the #
|
||||
# compiler is installed may be different. #
|
||||
# If you open this project with MPLAB X in the new host, this #
|
||||
# makefile will be regenerated and the paths will be corrected. #
|
||||
#######################################################################
|
||||
# fixDeps replaces a bunch of sed/cat/printf statements that slow down the build
|
||||
FIXDEPS=fixDeps
|
||||
|
||||
.build-conf: ${BUILD_SUBPROJECTS}
|
||||
ifneq ($(INFORMATION_MESSAGE), )
|
||||
@echo $(INFORMATION_MESSAGE)
|
||||
endif
|
||||
${MAKE} -f nbproject/Makefile-default.mk ${DISTDIR}/fg004a.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
|
||||
|
||||
MP_PROCESSOR_OPTION=ATtiny404
|
||||
# ------------------------------------------------------------------------------------
|
||||
# Rules for buildStep: assemble
|
||||
ifeq ($(TYPE_IMAGE), DEBUG_RUN)
|
||||
else
|
||||
endif
|
||||
|
||||
# ------------------------------------------------------------------------------------
|
||||
# Rules for buildStep: assembleWithPreprocess
|
||||
ifeq ($(TYPE_IMAGE), DEBUG_RUN)
|
||||
else
|
||||
endif
|
||||
|
||||
# ------------------------------------------------------------------------------------
|
||||
# Rules for buildStep: compile
|
||||
ifeq ($(TYPE_IMAGE), DEBUG_RUN)
|
||||
${OBJECTDIR}/main.o: main.c .generated_files/flags/default/fb9268029ec6f74151f2e86d3e38c724cee37776 .generated_files/flags/default/da39a3ee5e6b4b0d3255bfef95601890afd80709
|
||||
@${MKDIR} "${OBJECTDIR}"
|
||||
@${RM} ${OBJECTDIR}/main.o.d
|
||||
@${RM} ${OBJECTDIR}/main.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -mmcu=attiny404 ${PACK_COMPILER_OPTIONS} ${PACK_COMMON_OPTIONS} -g -DDEBUG -gdwarf-2 -x c -c -D__$(MP_PROCESSOR_OPTION)__ -funsigned-char -funsigned-bitfields -O1 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -Wall -MD -MP -MF "${OBJECTDIR}/main.o.d" -MT "${OBJECTDIR}/main.o.d" -MT ${OBJECTDIR}/main.o -o ${OBJECTDIR}/main.o main.c -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
|
||||
${OBJECTDIR}/ADC.o: ADC.c .generated_files/flags/default/f122489a524e88058eea280a192135d1b3c7dcf5 .generated_files/flags/default/da39a3ee5e6b4b0d3255bfef95601890afd80709
|
||||
@${MKDIR} "${OBJECTDIR}"
|
||||
@${RM} ${OBJECTDIR}/ADC.o.d
|
||||
@${RM} ${OBJECTDIR}/ADC.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -mmcu=attiny404 ${PACK_COMPILER_OPTIONS} ${PACK_COMMON_OPTIONS} -g -DDEBUG -gdwarf-2 -x c -c -D__$(MP_PROCESSOR_OPTION)__ -funsigned-char -funsigned-bitfields -O1 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -Wall -MD -MP -MF "${OBJECTDIR}/ADC.o.d" -MT "${OBJECTDIR}/ADC.o.d" -MT ${OBJECTDIR}/ADC.o -o ${OBJECTDIR}/ADC.o ADC.c -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
|
||||
${OBJECTDIR}/RegEdit.o: RegEdit.c .generated_files/flags/default/9bc268bbb52bbf2ec17312e438cb88b01c311165 .generated_files/flags/default/da39a3ee5e6b4b0d3255bfef95601890afd80709
|
||||
@${MKDIR} "${OBJECTDIR}"
|
||||
@${RM} ${OBJECTDIR}/RegEdit.o.d
|
||||
@${RM} ${OBJECTDIR}/RegEdit.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -mmcu=attiny404 ${PACK_COMPILER_OPTIONS} ${PACK_COMMON_OPTIONS} -g -DDEBUG -gdwarf-2 -x c -c -D__$(MP_PROCESSOR_OPTION)__ -funsigned-char -funsigned-bitfields -O1 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -Wall -MD -MP -MF "${OBJECTDIR}/RegEdit.o.d" -MT "${OBJECTDIR}/RegEdit.o.d" -MT ${OBJECTDIR}/RegEdit.o -o ${OBJECTDIR}/RegEdit.o RegEdit.c -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
|
||||
${OBJECTDIR}/TriacOut.o: TriacOut.c .generated_files/flags/default/d135b3bd18c20024d8f416e13555456030bd7791 .generated_files/flags/default/da39a3ee5e6b4b0d3255bfef95601890afd80709
|
||||
@${MKDIR} "${OBJECTDIR}"
|
||||
@${RM} ${OBJECTDIR}/TriacOut.o.d
|
||||
@${RM} ${OBJECTDIR}/TriacOut.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -mmcu=attiny404 ${PACK_COMPILER_OPTIONS} ${PACK_COMMON_OPTIONS} -g -DDEBUG -gdwarf-2 -x c -c -D__$(MP_PROCESSOR_OPTION)__ -funsigned-char -funsigned-bitfields -O1 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -Wall -MD -MP -MF "${OBJECTDIR}/TriacOut.o.d" -MT "${OBJECTDIR}/TriacOut.o.d" -MT ${OBJECTDIR}/TriacOut.o -o ${OBJECTDIR}/TriacOut.o TriacOut.c -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
|
||||
${OBJECTDIR}/zero_cross_detection.o: zero_cross_detection.c .generated_files/flags/default/6a5cfe4cc94a56569160676e4f8ae7e101d86a5e .generated_files/flags/default/da39a3ee5e6b4b0d3255bfef95601890afd80709
|
||||
@${MKDIR} "${OBJECTDIR}"
|
||||
@${RM} ${OBJECTDIR}/zero_cross_detection.o.d
|
||||
@${RM} ${OBJECTDIR}/zero_cross_detection.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -mmcu=attiny404 ${PACK_COMPILER_OPTIONS} ${PACK_COMMON_OPTIONS} -g -DDEBUG -gdwarf-2 -x c -c -D__$(MP_PROCESSOR_OPTION)__ -funsigned-char -funsigned-bitfields -O1 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -Wall -MD -MP -MF "${OBJECTDIR}/zero_cross_detection.o.d" -MT "${OBJECTDIR}/zero_cross_detection.o.d" -MT ${OBJECTDIR}/zero_cross_detection.o -o ${OBJECTDIR}/zero_cross_detection.o zero_cross_detection.c -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
|
||||
else
|
||||
${OBJECTDIR}/main.o: main.c .generated_files/flags/default/52eaeaa7d07ae90b9ebbffbef306cbbce3aa5f10 .generated_files/flags/default/da39a3ee5e6b4b0d3255bfef95601890afd80709
|
||||
@${MKDIR} "${OBJECTDIR}"
|
||||
@${RM} ${OBJECTDIR}/main.o.d
|
||||
@${RM} ${OBJECTDIR}/main.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -mmcu=attiny404 ${PACK_COMPILER_OPTIONS} ${PACK_COMMON_OPTIONS} -x c -c -D__$(MP_PROCESSOR_OPTION)__ -funsigned-char -funsigned-bitfields -O1 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -Wall -MD -MP -MF "${OBJECTDIR}/main.o.d" -MT "${OBJECTDIR}/main.o.d" -MT ${OBJECTDIR}/main.o -o ${OBJECTDIR}/main.o main.c -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
|
||||
${OBJECTDIR}/ADC.o: ADC.c .generated_files/flags/default/eede8fb82cddf13164026cbfcbdc2161dc5d1027 .generated_files/flags/default/da39a3ee5e6b4b0d3255bfef95601890afd80709
|
||||
@${MKDIR} "${OBJECTDIR}"
|
||||
@${RM} ${OBJECTDIR}/ADC.o.d
|
||||
@${RM} ${OBJECTDIR}/ADC.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -mmcu=attiny404 ${PACK_COMPILER_OPTIONS} ${PACK_COMMON_OPTIONS} -x c -c -D__$(MP_PROCESSOR_OPTION)__ -funsigned-char -funsigned-bitfields -O1 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -Wall -MD -MP -MF "${OBJECTDIR}/ADC.o.d" -MT "${OBJECTDIR}/ADC.o.d" -MT ${OBJECTDIR}/ADC.o -o ${OBJECTDIR}/ADC.o ADC.c -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
|
||||
${OBJECTDIR}/RegEdit.o: RegEdit.c .generated_files/flags/default/d5ee38712223313b7ee32ed8ef5a076d2a609128 .generated_files/flags/default/da39a3ee5e6b4b0d3255bfef95601890afd80709
|
||||
@${MKDIR} "${OBJECTDIR}"
|
||||
@${RM} ${OBJECTDIR}/RegEdit.o.d
|
||||
@${RM} ${OBJECTDIR}/RegEdit.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -mmcu=attiny404 ${PACK_COMPILER_OPTIONS} ${PACK_COMMON_OPTIONS} -x c -c -D__$(MP_PROCESSOR_OPTION)__ -funsigned-char -funsigned-bitfields -O1 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -Wall -MD -MP -MF "${OBJECTDIR}/RegEdit.o.d" -MT "${OBJECTDIR}/RegEdit.o.d" -MT ${OBJECTDIR}/RegEdit.o -o ${OBJECTDIR}/RegEdit.o RegEdit.c -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
|
||||
${OBJECTDIR}/TriacOut.o: TriacOut.c .generated_files/flags/default/f05fe06cd9004fe425620b9796b5f29c464a514d .generated_files/flags/default/da39a3ee5e6b4b0d3255bfef95601890afd80709
|
||||
@${MKDIR} "${OBJECTDIR}"
|
||||
@${RM} ${OBJECTDIR}/TriacOut.o.d
|
||||
@${RM} ${OBJECTDIR}/TriacOut.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -mmcu=attiny404 ${PACK_COMPILER_OPTIONS} ${PACK_COMMON_OPTIONS} -x c -c -D__$(MP_PROCESSOR_OPTION)__ -funsigned-char -funsigned-bitfields -O1 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -Wall -MD -MP -MF "${OBJECTDIR}/TriacOut.o.d" -MT "${OBJECTDIR}/TriacOut.o.d" -MT ${OBJECTDIR}/TriacOut.o -o ${OBJECTDIR}/TriacOut.o TriacOut.c -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
|
||||
${OBJECTDIR}/zero_cross_detection.o: zero_cross_detection.c .generated_files/flags/default/ce134025f38c83d75f9f46ccf18023b6ee51cd4 .generated_files/flags/default/da39a3ee5e6b4b0d3255bfef95601890afd80709
|
||||
@${MKDIR} "${OBJECTDIR}"
|
||||
@${RM} ${OBJECTDIR}/zero_cross_detection.o.d
|
||||
@${RM} ${OBJECTDIR}/zero_cross_detection.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -mmcu=attiny404 ${PACK_COMPILER_OPTIONS} ${PACK_COMMON_OPTIONS} -x c -c -D__$(MP_PROCESSOR_OPTION)__ -funsigned-char -funsigned-bitfields -O1 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -Wall -MD -MP -MF "${OBJECTDIR}/zero_cross_detection.o.d" -MT "${OBJECTDIR}/zero_cross_detection.o.d" -MT ${OBJECTDIR}/zero_cross_detection.o -o ${OBJECTDIR}/zero_cross_detection.o zero_cross_detection.c -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
|
||||
endif
|
||||
|
||||
# ------------------------------------------------------------------------------------
|
||||
# Rules for buildStep: compileCPP
|
||||
ifeq ($(TYPE_IMAGE), DEBUG_RUN)
|
||||
else
|
||||
endif
|
||||
|
||||
# ------------------------------------------------------------------------------------
|
||||
# Rules for buildStep: link
|
||||
ifeq ($(TYPE_IMAGE), DEBUG_RUN)
|
||||
${DISTDIR}/fg004a.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}: ${OBJECTFILES} nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} ${DISTDIR}
|
||||
${MP_CC} $(MP_EXTRA_LD_PRE) -mmcu=attiny404 ${PACK_COMMON_OPTIONS} -gdwarf-2 -D__$(MP_PROCESSOR_OPTION)__ -Wl,-Map="${DISTDIR}\fg004a.X.${IMAGE_TYPE}.map" -o ${DISTDIR}/fg004a.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} ${OBJECTFILES_QUOTED_IF_SPACED} -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD) -Wl,--defsym=__MPLAB_BUILD=1$(MP_EXTRA_LD_POST)$(MP_LINKER_FILE_OPTION),--defsym=__ICD2RAM=1,--defsym=__MPLAB_DEBUG=1,--defsym=__DEBUG=1 -Wl,--gc-sections -Wl,--start-group -Wl,-lm -Wl,--end-group
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
else
|
||||
${DISTDIR}/fg004a.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}: ${OBJECTFILES} nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} ${DISTDIR}
|
||||
${MP_CC} $(MP_EXTRA_LD_PRE) -mmcu=attiny404 ${PACK_COMMON_OPTIONS} -D__$(MP_PROCESSOR_OPTION)__ -Wl,-Map="${DISTDIR}\fg004a.X.${IMAGE_TYPE}.map" -o ${DISTDIR}/fg004a.X.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} ${OBJECTFILES_QUOTED_IF_SPACED} -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD) -Wl,--defsym=__MPLAB_BUILD=1$(MP_EXTRA_LD_POST)$(MP_LINKER_FILE_OPTION) -Wl,--gc-sections -Wl,--start-group -Wl,-lm -Wl,--end-group
|
||||
${MP_CC_DIR}\\avr-objcopy -O ihex "${DISTDIR}/fg004a.X.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX}" "${DISTDIR}/fg004a.X.${IMAGE_TYPE}.hex"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
endif
|
||||
|
||||
|
||||
# Subprojects
|
||||
.build-subprojects:
|
||||
|
||||
|
||||
# Subprojects
|
||||
.clean-subprojects:
|
||||
|
||||
# Clean Targets
|
||||
.clean-conf: ${CLEAN_SUBPROJECTS}
|
||||
${RM} -r ${OBJECTDIR}
|
||||
${RM} -r ${DISTDIR}
|
||||
|
||||
# Enable dependency checking
|
||||
.dep.inc: .depcheck-impl
|
||||
|
||||
DEPFILES=$(wildcard ${POSSIBLE_DEPFILES})
|
||||
ifneq (${DEPFILES},)
|
||||
include ${DEPFILES}
|
||||
endif
|
|
@ -0,0 +1,13 @@
|
|||
#
|
||||
#Mon Aug 26 12:03:26 PDT 2024
|
||||
attiny404.com-microchip-mplab-mdbcore-PK5Tool-PK5ToolImpl.md5=8ed9aa4326bfc0c1a849e697826741b7
|
||||
attiny404.languagetoolchain.version=2.46
|
||||
attiny404.com-microchip-mplab-nbide-toolchain-xc8-XC8LanguageToolchain.md5=bf89cdcdd6c0a49174fe4b605ef2b42d
|
||||
conf.ids=,attiny404
|
||||
host.id=2ov5-ff4p-rv
|
||||
configurations-xml=242f2f04760750dac539c59b69dd7cde
|
||||
com-microchip-mplab-nbide-embedded-makeproject-MakeProject.md5=f612087c95360c842296d189edfe3321
|
||||
attiny404.languagetoolchain.dir=/opt/microchip/xc8/v2.46/bin
|
||||
proj.dir=/home/ronin/Documents/projects/freelance/laith_naaman/Relay_Tester
|
||||
attiny404.Pack.dfplocation=/opt/microchip/mplabx/v6.20/packs/Microchip/ATtiny_DFP/3.1.260
|
||||
host.platform=linux
|
|
@ -0,0 +1,71 @@
|
|||
#
|
||||
# Generated Makefile - do not edit!
|
||||
#
|
||||
# Edit the Makefile in the project folder instead (../Makefile). Each target
|
||||
# has a pre- and a post- target defined where you can add customization code.
|
||||
#
|
||||
# This makefile implements macros and targets common to all configurations.
|
||||
#
|
||||
# NOCDDL
|
||||
|
||||
|
||||
# Building and Cleaning subprojects are done by default, but can be controlled with the SUB
|
||||
# macro. If SUB=no, subprojects will not be built or cleaned. The following macro
|
||||
# statements set BUILD_SUB-CONF and CLEAN_SUB-CONF to .build-reqprojects-conf
|
||||
# and .clean-reqprojects-conf unless SUB has the value 'no'
|
||||
SUB_no=NO
|
||||
SUBPROJECTS=${SUB_${SUB}}
|
||||
BUILD_SUBPROJECTS_=.build-subprojects
|
||||
BUILD_SUBPROJECTS_NO=
|
||||
BUILD_SUBPROJECTS=${BUILD_SUBPROJECTS_${SUBPROJECTS}}
|
||||
CLEAN_SUBPROJECTS_=.clean-subprojects
|
||||
CLEAN_SUBPROJECTS_NO=
|
||||
CLEAN_SUBPROJECTS=${CLEAN_SUBPROJECTS_${SUBPROJECTS}}
|
||||
|
||||
|
||||
# Project Name
|
||||
PROJECTNAME=Relay_Tester
|
||||
|
||||
# Active Configuration
|
||||
DEFAULTCONF=attiny404
|
||||
CONF=${DEFAULTCONF}
|
||||
|
||||
# All Configurations
|
||||
ALLCONFS=default attiny404
|
||||
|
||||
|
||||
# build
|
||||
.build-impl: .build-pre
|
||||
${MAKE} -f nbproject/Makefile-${CONF}.mk SUBPROJECTS=${SUBPROJECTS} .build-conf
|
||||
|
||||
|
||||
# clean
|
||||
.clean-impl: .clean-pre
|
||||
${MAKE} -f nbproject/Makefile-${CONF}.mk SUBPROJECTS=${SUBPROJECTS} .clean-conf
|
||||
|
||||
# clobber
|
||||
.clobber-impl: .clobber-pre .depcheck-impl
|
||||
${MAKE} SUBPROJECTS=${SUBPROJECTS} CONF=default clean
|
||||
${MAKE} SUBPROJECTS=${SUBPROJECTS} CONF=attiny404 clean
|
||||
|
||||
|
||||
|
||||
# all
|
||||
.all-impl: .all-pre .depcheck-impl
|
||||
${MAKE} SUBPROJECTS=${SUBPROJECTS} CONF=default build
|
||||
${MAKE} SUBPROJECTS=${SUBPROJECTS} CONF=attiny404 build
|
||||
|
||||
|
||||
|
||||
# dependency checking support
|
||||
.depcheck-impl:
|
||||
# @echo "# This code depends on make tool being used" >.dep.inc
|
||||
# @if [ -n "${MAKE_VERSION}" ]; then \
|
||||
# echo "DEPFILES=\$$(wildcard \$$(addsuffix .d, \$${OBJECTFILES}))" >>.dep.inc; \
|
||||
# echo "ifneq (\$${DEPFILES},)" >>.dep.inc; \
|
||||
# echo "include \$${DEPFILES}" >>.dep.inc; \
|
||||
# echo "endif" >>.dep.inc; \
|
||||
# else \
|
||||
# echo ".KEEP_STATE:" >>.dep.inc; \
|
||||
# echo ".KEEP_STATE_FILE:.make.state.\$${CONF}" >>.dep.inc; \
|
||||
# fi
|
|
@ -0,0 +1,36 @@
|
|||
#
|
||||
# Generated Makefile - do not edit!
|
||||
#
|
||||
#
|
||||
# This file contains information about the location of compilers and other tools.
|
||||
# If you commmit this file into your revision control server, you will be able to
|
||||
# to checkout the project and build it from the command line with make. However,
|
||||
# if more than one person works on the same project, then this file might show
|
||||
# conflicts since different users are bound to have compilers in different places.
|
||||
# In that case you might choose to not commit this file and let MPLAB X recreate this file
|
||||
# for each user. The disadvantage of not commiting this file is that you must run MPLAB X at
|
||||
# least once so the file gets created and the project can be built. Finally, you can also
|
||||
# avoid using this file at all if you are only building from the command line with make.
|
||||
# You can invoke make with the values of the macros:
|
||||
# $ makeMP_CC="/opt/microchip/mplabc30/v3.30c/bin/pic30-gcc" ...
|
||||
#
|
||||
PATH_TO_IDE_BIN=/opt/microchip/mplabx/v6.20/mplab_platform/platform/../mplab_ide/modules/../../bin/
|
||||
# Adding MPLAB X bin directory to path.
|
||||
PATH:=/opt/microchip/mplabx/v6.20/mplab_platform/platform/../mplab_ide/modules/../../bin/:$(PATH)
|
||||
# Path to java used to run MPLAB X when this makefile was created
|
||||
MP_JAVA_PATH="/opt/microchip/mplabx/v6.20/sys/java/zulu8.64.0.19-ca-fx-jre8.0.345-linux_x64/bin/"
|
||||
OS_CURRENT="$(shell uname -s)"
|
||||
MP_CC="/opt/microchip/xc8/v2.46/bin/xc8-cc"
|
||||
# MP_CPPC is not defined
|
||||
# MP_BC is not defined
|
||||
MP_AS="/opt/microchip/xc8/v2.46/bin/xc8-cc"
|
||||
MP_LD="/opt/microchip/xc8/v2.46/bin/xc8-cc"
|
||||
MP_AR="/opt/microchip/xc8/v2.46/bin/xc8-ar"
|
||||
DEP_GEN=${MP_JAVA_PATH}java -jar "/opt/microchip/mplabx/v6.20/mplab_platform/platform/../mplab_ide/modules/../../bin/extractobjectdependencies.jar"
|
||||
MP_CC_DIR="/opt/microchip/xc8/v2.46/bin"
|
||||
# MP_CPPC_DIR is not defined
|
||||
# MP_BC_DIR is not defined
|
||||
MP_AS_DIR="/opt/microchip/xc8/v2.46/bin"
|
||||
MP_LD_DIR="/opt/microchip/xc8/v2.46/bin"
|
||||
MP_AR_DIR="/opt/microchip/xc8/v2.46/bin"
|
||||
DFP_DIR=/opt/microchip/mplabx/v6.20/packs/Microchip/ATtiny_DFP/3.1.260
|
|
@ -0,0 +1,37 @@
|
|||
#
|
||||
# Generated Makefile - do not edit!
|
||||
#
|
||||
#
|
||||
# This file contains information about the location of compilers and other tools.
|
||||
# If you commmit this file into your revision control server, you will be able to
|
||||
# to checkout the project and build it from the command line with make. However,
|
||||
# if more than one person works on the same project, then this file might show
|
||||
# conflicts since different users are bound to have compilers in different places.
|
||||
# In that case you might choose to not commit this file and let MPLAB X recreate this file
|
||||
# for each user. The disadvantage of not commiting this file is that you must run MPLAB X at
|
||||
# least once so the file gets created and the project can be built. Finally, you can also
|
||||
# avoid using this file at all if you are only building from the command line with make.
|
||||
# You can invoke make with the values of the macros:
|
||||
# $ makeMP_CC="/opt/microchip/mplabc30/v3.30c/bin/pic30-gcc" ...
|
||||
#
|
||||
SHELL=cmd.exe
|
||||
PATH_TO_IDE_BIN=C:/Program Files/Microchip/MPLABX/v6.20/mplab_platform/platform/../mplab_ide/modules/../../bin/
|
||||
# Adding MPLAB X bin directory to path.
|
||||
PATH:=C:/Program Files/Microchip/MPLABX/v6.20/mplab_platform/platform/../mplab_ide/modules/../../bin/:$(PATH)
|
||||
# Path to java used to run MPLAB X when this makefile was created
|
||||
MP_JAVA_PATH="C:\Program Files\Microchip\MPLABX\v6.20\sys\java\zulu8.64.0.19-ca-fx-jre8.0.345-win_x64/bin/"
|
||||
OS_CURRENT="$(shell uname -s)"
|
||||
MP_CC="C:\Program Files\avr-gcc\bin\avr-gcc.exe"
|
||||
MP_CPPC="C:\Program Files\avr-gcc\bin\avr-g++.exe"
|
||||
# MP_BC is not defined
|
||||
MP_AS="C:\Program Files\avr-gcc\bin\avr-as.exe"
|
||||
MP_LD="C:\Program Files\avr-gcc\bin\avr-ld.exe"
|
||||
MP_AR="C:\Program Files\avr-gcc\bin\avr-gcc-ar.exe"
|
||||
DEP_GEN=${MP_JAVA_PATH}java -jar "C:/Program Files/Microchip/MPLABX/v6.20/mplab_platform/platform/../mplab_ide/modules/../../bin/extractobjectdependencies.jar"
|
||||
MP_CC_DIR="C:\Program Files\avr-gcc\bin"
|
||||
MP_CPPC_DIR="C:\Program Files\avr-gcc\bin"
|
||||
# MP_BC_DIR is not defined
|
||||
MP_AS_DIR="C:\Program Files\avr-gcc\bin"
|
||||
MP_LD_DIR="C:\Program Files\avr-gcc\bin"
|
||||
MP_AR_DIR="C:\Program Files\avr-gcc\bin"
|
||||
DFP_DIR=C:/Program Files/Microchip/MPLABX/v6.20/packs/Microchip/ATtiny_DFP/3.1.260
|
|
@ -0,0 +1,14 @@
|
|||
#
|
||||
# Generated - do not edit!
|
||||
#
|
||||
# NOCDDL
|
||||
#
|
||||
CND_BASEDIR=`pwd`
|
||||
# default configuration
|
||||
CND_ARTIFACT_DIR_default=dist/default/production
|
||||
CND_ARTIFACT_NAME_default=Relay_Tester.production.hex
|
||||
CND_ARTIFACT_PATH_default=dist/default/production/Relay_Tester.production.hex
|
||||
# attiny404 configuration
|
||||
CND_ARTIFACT_DIR_attiny404=dist/attiny404/production
|
||||
CND_ARTIFACT_NAME_attiny404=Relay_Tester.production.hex
|
||||
CND_ARTIFACT_PATH_attiny404=dist/attiny404/production/Relay_Tester.production.hex
|
|
@ -0,0 +1,585 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configurationDescriptor version="65">
|
||||
<logicalFolder name="root" displayName="root" projectFiles="true">
|
||||
<logicalFolder name="HeaderFiles"
|
||||
displayName="Header Files"
|
||||
projectFiles="true">
|
||||
<itemPath>src/RegEdit/RegEdit.h</itemPath>
|
||||
<itemPath>src/usart/usart.h</itemPath>
|
||||
<itemPath>inc/config.h</itemPath>
|
||||
<itemPath>src/LedController/LedController.h</itemPath>
|
||||
</logicalFolder>
|
||||
<logicalFolder name="ExternalFiles"
|
||||
displayName="Important Files"
|
||||
projectFiles="true">
|
||||
<itemPath>Makefile</itemPath>
|
||||
</logicalFolder>
|
||||
<logicalFolder name="LinkerScript"
|
||||
displayName="Linker Files"
|
||||
projectFiles="true">
|
||||
</logicalFolder>
|
||||
<logicalFolder name="SourceFiles"
|
||||
displayName="Source Files"
|
||||
projectFiles="true">
|
||||
<itemPath>src/main.c</itemPath>
|
||||
<itemPath>src/RegEdit/RegEdit.c</itemPath>
|
||||
<itemPath>src/usart/usart.c</itemPath>
|
||||
<itemPath>src/timer/timer.c</itemPath>
|
||||
<itemPath>src/LedController/LedController.c</itemPath>
|
||||
</logicalFolder>
|
||||
</logicalFolder>
|
||||
<sourceRootList>
|
||||
<Elem>.</Elem>
|
||||
</sourceRootList>
|
||||
<projectmakefile>Makefile</projectmakefile>
|
||||
<confs>
|
||||
<conf name="default" type="2">
|
||||
<toolsSet>
|
||||
<developmentServer>localhost</developmentServer>
|
||||
<targetDevice>ATtiny404</targetDevice>
|
||||
<targetHeader></targetHeader>
|
||||
<targetPluginBoard></targetPluginBoard>
|
||||
<platformTool>PK5Tool</platformTool>
|
||||
<languageToolchain>AVR</languageToolchain>
|
||||
<languageToolchainVersion>1.00</languageToolchainVersion>
|
||||
<platform>2</platform>
|
||||
</toolsSet>
|
||||
<packs>
|
||||
<pack name="ATtiny_DFP" vendor="Microchip" version="3.1.260"/>
|
||||
</packs>
|
||||
<ScriptingSettings>
|
||||
</ScriptingSettings>
|
||||
<compileType>
|
||||
<linkerTool>
|
||||
<linkerLibItems>
|
||||
</linkerLibItems>
|
||||
</linkerTool>
|
||||
<archiverTool>
|
||||
</archiverTool>
|
||||
<loading>
|
||||
<useAlternateLoadableFile>false</useAlternateLoadableFile>
|
||||
<parseOnProdLoad>false</parseOnProdLoad>
|
||||
<alternateLoadableFile></alternateLoadableFile>
|
||||
</loading>
|
||||
<subordinates>
|
||||
</subordinates>
|
||||
</compileType>
|
||||
<makeCustomizationType>
|
||||
<makeCustomizationPreStepEnabled>false</makeCustomizationPreStepEnabled>
|
||||
<makeUseCleanTarget>false</makeUseCleanTarget>
|
||||
<makeCustomizationPreStep></makeCustomizationPreStep>
|
||||
<makeCustomizationPostStepEnabled>false</makeCustomizationPostStepEnabled>
|
||||
<makeCustomizationPostStep></makeCustomizationPostStep>
|
||||
<makeCustomizationPutChecksumInUserID>false</makeCustomizationPutChecksumInUserID>
|
||||
<makeCustomizationEnableLongLines>false</makeCustomizationEnableLongLines>
|
||||
<makeCustomizationNormalizeHexFile>false</makeCustomizationNormalizeHexFile>
|
||||
</makeCustomizationType>
|
||||
<AVR-AR>
|
||||
<property key="archiver-flags" value="-r"/>
|
||||
</AVR-AR>
|
||||
<AVR-AS>
|
||||
<property key="announce-version" value="false"/>
|
||||
<property key="include-paths" value=""/>
|
||||
<property key="suppress-warnings" value="false"/>
|
||||
</AVR-AS>
|
||||
<AVR-AS-PRE>
|
||||
<property key="announce-version" value="false"/>
|
||||
<property key="include-paths" value=""/>
|
||||
<property key="preprocessor-macros" value=""/>
|
||||
<property key="preprocessor-macros-undefined" value=""/>
|
||||
<property key="suppress-warnings" value="false"/>
|
||||
</AVR-AS-PRE>
|
||||
<AVR-CPP>
|
||||
<property key="additional-warnings" value="true"/>
|
||||
<property key="call-prologues" value="false"/>
|
||||
<property key="default-bitfield-type" value="true"/>
|
||||
<property key="default-char-type" value="true"/>
|
||||
<property key="extra-include-directories" value=""/>
|
||||
<property key="garbage-collect-data" value="true"/>
|
||||
<property key="garbage-collect-functions" value="true"/>
|
||||
<property key="inhibit-all" value="false"/>
|
||||
<property key="make-warnings-into-errors" value="false"/>
|
||||
<property key="no-interrupts" value="false"/>
|
||||
<property key="no-system-directories" value="false"/>
|
||||
<property key="optimization-level" value="-O1"/>
|
||||
<property key="pack-struct" value="true"/>
|
||||
<property key="preprocess-only" value="false"/>
|
||||
<property key="preprocessor-macros" value=""/>
|
||||
<property key="preprocessor-macros-undefined" value=""/>
|
||||
<property key="save-temps" value="false"/>
|
||||
<property key="short-calls" value="false"/>
|
||||
<property key="short-enums" value="true"/>
|
||||
<property key="strict-ansi" value="false"/>
|
||||
<property key="strict-ansi-errors" value="false"/>
|
||||
<property key="support-ansi" value="false"/>
|
||||
<property key="syntax-only" value="false"/>
|
||||
<property key="undefined-identifier" value="false"/>
|
||||
<property key="verbose" value="false"/>
|
||||
</AVR-CPP>
|
||||
<AVR-GCC>
|
||||
<property key="additional-warnings" value="true"/>
|
||||
<property key="call-prologues" value="false"/>
|
||||
<property key="default-bitfield-type" value="true"/>
|
||||
<property key="default-char-type" value="true"/>
|
||||
<property key="extra-include-directories" value=""/>
|
||||
<property key="extra-warnings" value="false"/>
|
||||
<property key="garbage-collect-data" value="true"/>
|
||||
<property key="garbage-collect-functions" value="true"/>
|
||||
<property key="inhibit-all" value="false"/>
|
||||
<property key="make-warnings-into-errors" value="false"/>
|
||||
<property key="no-interrupts" value="false"/>
|
||||
<property key="no-system-directories" value="false"/>
|
||||
<property key="optimization-level" value="-O1"/>
|
||||
<property key="pack-struct" value="true"/>
|
||||
<property key="preprocessor-macros" value=""/>
|
||||
<property key="preprocessor-macros-undefined" value=""/>
|
||||
<property key="save-temps" value="false"/>
|
||||
<property key="short-calls" value="false"/>
|
||||
<property key="short-enums" value="true"/>
|
||||
<property key="strict-ansi" value="false"/>
|
||||
<property key="strict-ansi-errors" value="false"/>
|
||||
<property key="support-ansi" value="false"/>
|
||||
<property key="syntax-only" value="false"/>
|
||||
<property key="undefined-identifier" value="false"/>
|
||||
<property key="verbose" value="false"/>
|
||||
</AVR-GCC>
|
||||
<AVR-Global>
|
||||
<property key="common-include-directories" value=""/>
|
||||
<property key="eep" value="false"/>
|
||||
<property key="external-ram-check" value="false"/>
|
||||
<property key="hex" value="true"/>
|
||||
<property key="lss" value="false"/>
|
||||
<property key="omit-pack-options" value="false"/>
|
||||
<property key="relax-branches" value="false"/>
|
||||
<property key="srec" value="false"/>
|
||||
<property key="user-pack-device-support" value=""/>
|
||||
<property key="user-pack-include" value=""/>
|
||||
<property key="usersig" value="false"/>
|
||||
</AVR-Global>
|
||||
<AVR-LD>
|
||||
<property key="eeprom-segment" value=""/>
|
||||
<property key="exclude-standard-libraries" value="false"/>
|
||||
<property key="extra-lib-directories" value=""/>
|
||||
<property key="flash-segment" value=""/>
|
||||
<property key="generate-map-file" value="true"/>
|
||||
<property key="initial-stack-address" value=""/>
|
||||
<property key="input-libraries" value="libm"/>
|
||||
<property key="no-default-libs" value="false"/>
|
||||
<property key="no-shared-libraries" value="false"/>
|
||||
<property key="no-startup-files" value="false"/>
|
||||
<property key="omit-symbol-information" value="false"/>
|
||||
<property key="other-options" value=""/>
|
||||
<property key="remove-unused-sections" value="true"/>
|
||||
<property key="rodata-writable" value="false"/>
|
||||
<property key="sram-segment" value=""/>
|
||||
<property key="v-printf" value="false"/>
|
||||
</AVR-LD>
|
||||
<PK5Tool>
|
||||
<property key="AutoSelectMemRanges" value="auto"/>
|
||||
<property key="SecureSegment.SegmentProgramming" value="FullChipProgramming"/>
|
||||
<property key="ToolFirmwareFilePath"
|
||||
value="Press to browse for a specific firmware version"/>
|
||||
<property key="ToolFirmwareOption.UpdateOptions"
|
||||
value="ToolFirmwareOption.UseLatest"/>
|
||||
<property key="ToolFirmwareToolPack"
|
||||
value="Press to select which tool pack to use"/>
|
||||
<property key="communication.activationmode" value="nohv"/>
|
||||
<property key="communication.interface" value="updi"/>
|
||||
<property key="communication.interface.jtag" value="2wire"/>
|
||||
<property key="communication.speed" value="0.500"/>
|
||||
<property key="debugoptions.debug-startup" value="Use system settings"/>
|
||||
<property key="debugoptions.reset-behaviour" value="Use system settings"/>
|
||||
<property key="debugoptions.useswbreakpoints" value="false"/>
|
||||
<property key="event.recorder.debugger.behavior" value="Running"/>
|
||||
<property key="event.recorder.enabled" value="false"/>
|
||||
<property key="event.recorder.scvd.files" value=""/>
|
||||
<property key="hwtoolclock.frcindebug" value="false"/>
|
||||
<property key="lastid" value=""/>
|
||||
<property key="memories.aux" value="false"/>
|
||||
<property key="memories.bootflash" value="true"/>
|
||||
<property key="memories.configurationmemory" value="true"/>
|
||||
<property key="memories.configurationmemory2" value="true"/>
|
||||
<property key="memories.dataflash" value="true"/>
|
||||
<property key="memories.eeprom" value="true"/>
|
||||
<property key="memories.exclude.configurationmemory" value="true"/>
|
||||
<property key="memories.flashdata" value="true"/>
|
||||
<property key="memories.id" value="true"/>
|
||||
<property key="memories.instruction.ram.ranges"
|
||||
value="${memories.instruction.ram.ranges}"/>
|
||||
<property key="memories.programmemory" value="true"/>
|
||||
<property key="memories.programmemory.ranges" value="0-7ff"/>
|
||||
<property key="poweroptions.powerenable" value="true"/>
|
||||
<property key="programmerToGoImageName" value="fg004a_ptg"/>
|
||||
<property key="programoptions.donoteraseauxmem" value="false"/>
|
||||
<property key="programoptions.eraseb4program" value="true"/>
|
||||
<property key="programoptions.ledbrightness" value="5"/>
|
||||
<property key="programoptions.pgcconfig" value="pull down"/>
|
||||
<property key="programoptions.pgcresistor.value" value="4.7"/>
|
||||
<property key="programoptions.pgdconfig" value="pull down"/>
|
||||
<property key="programoptions.pgdresistor.value" value="4.7"/>
|
||||
<property key="programoptions.pgmentry.voltage" value="low"/>
|
||||
<property key="programoptions.pgmspeed" value="Med"/>
|
||||
<property key="programoptions.preservedataflash" value="false"/>
|
||||
<property key="programoptions.preserveeeprom" value="false"/>
|
||||
<property key="programoptions.preserveeeprom.ranges" value="1400-147f"/>
|
||||
<property key="programoptions.preserveprogram.ranges" value=""/>
|
||||
<property key="programoptions.preserveprogramrange" value="false"/>
|
||||
<property key="programoptions.preserveuserid" value="false"/>
|
||||
<property key="programoptions.program.otpconfig" value="false"/>
|
||||
<property key="programoptions.programcalmem" value="false"/>
|
||||
<property key="programoptions.programuserotp" value="false"/>
|
||||
<property key="programoptions.smart.program" value="When debugging only"/>
|
||||
<property key="programoptions.testmodeentrymethod" value="VDDFirst"/>
|
||||
<property key="ptgProgramImage" value="true"/>
|
||||
<property key="ptgSendImage" value="true"/>
|
||||
<property key="toolpack.updateoptions"
|
||||
value="toolpack.updateoptions.uselatestoolpack"/>
|
||||
<property key="toolpack.updateoptions.packversion"
|
||||
value="Press to select which tool pack to use"/>
|
||||
<property key="voltagevalue" value="5.0"/>
|
||||
</PK5Tool>
|
||||
<Tool>
|
||||
<property key="AutoSelectMemRanges" value="auto"/>
|
||||
<property key="SecureSegment.SegmentProgramming" value="FullChipProgramming"/>
|
||||
<property key="ToolFirmwareFilePath"
|
||||
value="Press to browse for a specific firmware version"/>
|
||||
<property key="ToolFirmwareOption.UpdateOptions"
|
||||
value="ToolFirmwareOption.UseLatest"/>
|
||||
<property key="ToolFirmwareToolPack"
|
||||
value="Press to select which tool pack to use"/>
|
||||
<property key="communication.activationmode" value="nohv"/>
|
||||
<property key="communication.interface" value="updi"/>
|
||||
<property key="communication.interface.jtag" value="2wire"/>
|
||||
<property key="communication.speed" value="0.500"/>
|
||||
<property key="debugoptions.debug-startup" value="Use system settings"/>
|
||||
<property key="debugoptions.reset-behaviour" value="Use system settings"/>
|
||||
<property key="debugoptions.useswbreakpoints" value="false"/>
|
||||
<property key="event.recorder.debugger.behavior" value="Running"/>
|
||||
<property key="event.recorder.enabled" value="false"/>
|
||||
<property key="event.recorder.scvd.files" value=""/>
|
||||
<property key="hwtoolclock.frcindebug" value="false"/>
|
||||
<property key="lastid" value=""/>
|
||||
<property key="memories.aux" value="false"/>
|
||||
<property key="memories.bootflash" value="true"/>
|
||||
<property key="memories.configurationmemory" value="true"/>
|
||||
<property key="memories.configurationmemory2" value="true"/>
|
||||
<property key="memories.dataflash" value="true"/>
|
||||
<property key="memories.eeprom" value="true"/>
|
||||
<property key="memories.exclude.configurationmemory" value="true"/>
|
||||
<property key="memories.flashdata" value="true"/>
|
||||
<property key="memories.id" value="true"/>
|
||||
<property key="memories.instruction.ram.ranges"
|
||||
value="${memories.instruction.ram.ranges}"/>
|
||||
<property key="memories.programmemory" value="true"/>
|
||||
<property key="memories.programmemory.ranges" value="0-7ff"/>
|
||||
<property key="poweroptions.powerenable" value="true"/>
|
||||
<property key="programmerToGoFilePath"
|
||||
value="C:/Users/Lenovo/MPLABXProjects/fg004a.X/debug/default/fg004a_ptg"/>
|
||||
<property key="programmerToGoImageName" value="fg004a_ptg"/>
|
||||
<property key="programoptions.donoteraseauxmem" value="false"/>
|
||||
<property key="programoptions.eraseb4program" value="true"/>
|
||||
<property key="programoptions.ledbrightness" value="5"/>
|
||||
<property key="programoptions.pgcconfig" value="pull down"/>
|
||||
<property key="programoptions.pgcresistor.value" value="4.7"/>
|
||||
<property key="programoptions.pgdconfig" value="pull down"/>
|
||||
<property key="programoptions.pgdresistor.value" value="4.7"/>
|
||||
<property key="programoptions.pgmentry.voltage" value="low"/>
|
||||
<property key="programoptions.pgmspeed" value="Med"/>
|
||||
<property key="programoptions.preservedataflash" value="false"/>
|
||||
<property key="programoptions.preserveeeprom" value="false"/>
|
||||
<property key="programoptions.preserveeeprom.ranges" value="1400-147f"/>
|
||||
<property key="programoptions.preserveprogram.ranges" value=""/>
|
||||
<property key="programoptions.preserveprogramrange" value="false"/>
|
||||
<property key="programoptions.preserveuserid" value="false"/>
|
||||
<property key="programoptions.program.otpconfig" value="false"/>
|
||||
<property key="programoptions.programcalmem" value="false"/>
|
||||
<property key="programoptions.programuserotp" value="false"/>
|
||||
<property key="programoptions.smart.program" value="When debugging only"/>
|
||||
<property key="programoptions.testmodeentrymethod" value="VDDFirst"/>
|
||||
<property key="ptgProgramImage" value="true"/>
|
||||
<property key="ptgSendImage" value="true"/>
|
||||
<property key="toolpack.updateoptions"
|
||||
value="toolpack.updateoptions.uselatestoolpack"/>
|
||||
<property key="toolpack.updateoptions.packversion"
|
||||
value="Press to select which tool pack to use"/>
|
||||
<property key="voltagevalue" value="5.0"/>
|
||||
</Tool>
|
||||
</conf>
|
||||
<conf name="attiny404" type="2">
|
||||
<toolsSet>
|
||||
<developmentServer>localhost</developmentServer>
|
||||
<targetDevice>ATtiny404</targetDevice>
|
||||
<targetHeader></targetHeader>
|
||||
<targetPluginBoard></targetPluginBoard>
|
||||
<platformTool>PK5Tool</platformTool>
|
||||
<languageToolchain>XC8</languageToolchain>
|
||||
<languageToolchainVersion>2.46</languageToolchainVersion>
|
||||
<platform>2</platform>
|
||||
</toolsSet>
|
||||
<packs>
|
||||
<pack name="ATtiny_DFP" vendor="Microchip" version="3.1.260"/>
|
||||
</packs>
|
||||
<ScriptingSettings>
|
||||
</ScriptingSettings>
|
||||
<compileType>
|
||||
<linkerTool>
|
||||
<linkerLibItems>
|
||||
</linkerLibItems>
|
||||
</linkerTool>
|
||||
<archiverTool>
|
||||
</archiverTool>
|
||||
<loading>
|
||||
<useAlternateLoadableFile>false</useAlternateLoadableFile>
|
||||
<parseOnProdLoad>false</parseOnProdLoad>
|
||||
<alternateLoadableFile></alternateLoadableFile>
|
||||
</loading>
|
||||
<subordinates>
|
||||
</subordinates>
|
||||
</compileType>
|
||||
<makeCustomizationType>
|
||||
<makeCustomizationPreStepEnabled>false</makeCustomizationPreStepEnabled>
|
||||
<makeUseCleanTarget>false</makeUseCleanTarget>
|
||||
<makeCustomizationPreStep></makeCustomizationPreStep>
|
||||
<makeCustomizationPostStepEnabled>false</makeCustomizationPostStepEnabled>
|
||||
<makeCustomizationPostStep></makeCustomizationPostStep>
|
||||
<makeCustomizationPutChecksumInUserID>false</makeCustomizationPutChecksumInUserID>
|
||||
<makeCustomizationEnableLongLines>false</makeCustomizationEnableLongLines>
|
||||
<makeCustomizationNormalizeHexFile>false</makeCustomizationNormalizeHexFile>
|
||||
</makeCustomizationType>
|
||||
<HI-TECH-COMP>
|
||||
<property key="additional-warnings" value="true"/>
|
||||
<property key="asmlist" value="true"/>
|
||||
<property key="call-prologues" value="false"/>
|
||||
<property key="default-bitfield-type" value="true"/>
|
||||
<property key="default-char-type" value="true"/>
|
||||
<property key="define-macros" value=""/>
|
||||
<property key="disable-optimizations" value="false"/>
|
||||
<property key="extra-include-directories"
|
||||
value="src/RegEdit;src/usart;inc;src/timer;src/LedController"/>
|
||||
<property key="favor-optimization-for" value="-speed,+space"/>
|
||||
<property key="garbage-collect-data" value="true"/>
|
||||
<property key="garbage-collect-functions" value="true"/>
|
||||
<property key="identifier-length" value="255"/>
|
||||
<property key="local-generation" value="false"/>
|
||||
<property key="operation-mode" value="free"/>
|
||||
<property key="opt-xc8-compiler-strict_ansi" value="false"/>
|
||||
<property key="optimization-assembler" value="true"/>
|
||||
<property key="optimization-assembler-files" value="true"/>
|
||||
<property key="optimization-debug" value="false"/>
|
||||
<property key="optimization-invariant-enable" value="false"/>
|
||||
<property key="optimization-invariant-value" value="16"/>
|
||||
<property key="optimization-level" value="-O1"/>
|
||||
<property key="optimization-speed" value="false"/>
|
||||
<property key="optimization-stable-enable" value="false"/>
|
||||
<property key="preprocess-assembler" value="true"/>
|
||||
<property key="short-enums" value="true"/>
|
||||
<property key="tentative-definitions" value="-fno-common"/>
|
||||
<property key="undefine-macros" value=""/>
|
||||
<property key="use-cci" value="false"/>
|
||||
<property key="use-iar" value="false"/>
|
||||
<property key="verbose" value="false"/>
|
||||
<property key="warning-level" value="-3"/>
|
||||
<property key="what-to-do" value="ignore"/>
|
||||
</HI-TECH-COMP>
|
||||
<HI-TECH-LINK>
|
||||
<property key="additional-options-checksum" value=""/>
|
||||
<property key="additional-options-checksumAVR" value=""/>
|
||||
<property key="additional-options-code-offset" value=""/>
|
||||
<property key="additional-options-command-line" value=""/>
|
||||
<property key="additional-options-errata" value=""/>
|
||||
<property key="additional-options-extend-address" value="false"/>
|
||||
<property key="additional-options-trace-type" value=""/>
|
||||
<property key="additional-options-use-response-files" value="false"/>
|
||||
<property key="backup-reset-condition-flags" value="false"/>
|
||||
<property key="calibrate-oscillator" value="false"/>
|
||||
<property key="calibrate-oscillator-value" value="0x3400"/>
|
||||
<property key="clear-bss" value="true"/>
|
||||
<property key="code-model-external" value="wordwrite"/>
|
||||
<property key="code-model-rom" value=""/>
|
||||
<property key="create-html-files" value="false"/>
|
||||
<property key="data-model-ram" value=""/>
|
||||
<property key="data-model-size-of-double" value="24"/>
|
||||
<property key="data-model-size-of-double-gcc" value="no-short-double"/>
|
||||
<property key="data-model-size-of-float" value="24"/>
|
||||
<property key="data-model-size-of-float-gcc" value="no-short-float"/>
|
||||
<property key="display-class-usage" value="false"/>
|
||||
<property key="display-hex-usage" value="false"/>
|
||||
<property key="display-overall-usage" value="true"/>
|
||||
<property key="display-psect-usage" value="false"/>
|
||||
<property key="extra-lib-directories" value=""/>
|
||||
<property key="fill-flash-options-addr" value=""/>
|
||||
<property key="fill-flash-options-const" value=""/>
|
||||
<property key="fill-flash-options-how" value="0"/>
|
||||
<property key="fill-flash-options-inc-const" value="1"/>
|
||||
<property key="fill-flash-options-increment" value=""/>
|
||||
<property key="fill-flash-options-seq" value=""/>
|
||||
<property key="fill-flash-options-what" value="0"/>
|
||||
<property key="format-hex-file-for-download" value="false"/>
|
||||
<property key="initialize-data" value="true"/>
|
||||
<property key="input-libraries" value="libm"/>
|
||||
<property key="keep-generated-startup.as" value="false"/>
|
||||
<property key="link-in-c-library" value="true"/>
|
||||
<property key="link-in-c-library-gcc" value=""/>
|
||||
<property key="link-in-peripheral-library" value="false"/>
|
||||
<property key="managed-stack" value="false"/>
|
||||
<property key="opt-xc8-linker-file" value="false"/>
|
||||
<property key="opt-xc8-linker-link_startup" value="false"/>
|
||||
<property key="opt-xc8-linker-serial" value=""/>
|
||||
<property key="program-the-device-with-default-config-words" value="false"/>
|
||||
<property key="remove-unused-sections" value="true"/>
|
||||
</HI-TECH-LINK>
|
||||
<PK5Tool>
|
||||
<property key="AutoSelectMemRanges" value="auto"/>
|
||||
<property key="SecureSegment.SegmentProgramming" value="FullChipProgramming"/>
|
||||
<property key="ToolFirmwareFilePath"
|
||||
value="Press to browse for a specific firmware version"/>
|
||||
<property key="ToolFirmwareOption.UpdateOptions"
|
||||
value="ToolFirmwareOption.UseLatest"/>
|
||||
<property key="ToolFirmwareToolPack"
|
||||
value="Press to select which tool pack to use"/>
|
||||
<property key="communication.activationmode" value="nohv"/>
|
||||
<property key="communication.interface" value="updi"/>
|
||||
<property key="communication.interface.jtag" value="2wire"/>
|
||||
<property key="communication.speed" value="0.250"/>
|
||||
<property key="debugoptions.debug-startup" value="Use system settings"/>
|
||||
<property key="debugoptions.reset-behaviour" value="Use system settings"/>
|
||||
<property key="debugoptions.useswbreakpoints" value="false"/>
|
||||
<property key="event.recorder.debugger.behavior" value="Running"/>
|
||||
<property key="event.recorder.enabled" value="false"/>
|
||||
<property key="event.recorder.scvd.files" value=""/>
|
||||
<property key="hwtoolclock.frcindebug" value="false"/>
|
||||
<property key="lastid" value=""/>
|
||||
<property key="memories.aux" value="false"/>
|
||||
<property key="memories.bootflash" value="true"/>
|
||||
<property key="memories.configurationmemory" value="true"/>
|
||||
<property key="memories.configurationmemory2" value="true"/>
|
||||
<property key="memories.dataflash" value="true"/>
|
||||
<property key="memories.eeprom" value="true"/>
|
||||
<property key="memories.exclude.configurationmemory" value="true"/>
|
||||
<property key="memories.flashdata" value="true"/>
|
||||
<property key="memories.id" value="true"/>
|
||||
<property key="memories.instruction.ram.ranges"
|
||||
value="${memories.instruction.ram.ranges}"/>
|
||||
<property key="memories.programmemory" value="true"/>
|
||||
<property key="memories.programmemory.ranges" value="0-7ff"/>
|
||||
<property key="poweroptions.powerenable" value="true"/>
|
||||
<property key="programmerToGoImageName" value="fg004a_ptg"/>
|
||||
<property key="programoptions.donoteraseauxmem" value="false"/>
|
||||
<property key="programoptions.eraseb4program" value="true"/>
|
||||
<property key="programoptions.ledbrightness" value="5"/>
|
||||
<property key="programoptions.pgcconfig" value="pull down"/>
|
||||
<property key="programoptions.pgcresistor.value" value="4.7"/>
|
||||
<property key="programoptions.pgdconfig" value="pull down"/>
|
||||
<property key="programoptions.pgdresistor.value" value="4.7"/>
|
||||
<property key="programoptions.pgmentry.voltage" value="low"/>
|
||||
<property key="programoptions.pgmspeed" value="Med"/>
|
||||
<property key="programoptions.preservedataflash" value="false"/>
|
||||
<property key="programoptions.preserveeeprom" value="false"/>
|
||||
<property key="programoptions.preserveeeprom.ranges" value="1400-147f"/>
|
||||
<property key="programoptions.preserveprogram.ranges" value=""/>
|
||||
<property key="programoptions.preserveprogramrange" value="false"/>
|
||||
<property key="programoptions.preserveuserid" value="false"/>
|
||||
<property key="programoptions.program.otpconfig" value="false"/>
|
||||
<property key="programoptions.programcalmem" value="false"/>
|
||||
<property key="programoptions.programuserotp" value="false"/>
|
||||
<property key="programoptions.smart.program" value="When debugging only"/>
|
||||
<property key="programoptions.testmodeentrymethod" value="VDDFirst"/>
|
||||
<property key="ptgProgramImage" value="true"/>
|
||||
<property key="ptgSendImage" value="true"/>
|
||||
<property key="toolpack.updateoptions"
|
||||
value="toolpack.updateoptions.uselatestoolpack"/>
|
||||
<property key="toolpack.updateoptions.packversion"
|
||||
value="Press to select which tool pack to use"/>
|
||||
<property key="voltagevalue" value="5.0"/>
|
||||
</PK5Tool>
|
||||
<Tool>
|
||||
<property key="AutoSelectMemRanges" value="auto"/>
|
||||
<property key="SecureSegment.SegmentProgramming" value="FullChipProgramming"/>
|
||||
<property key="ToolFirmwareFilePath"
|
||||
value="Press to browse for a specific firmware version"/>
|
||||
<property key="ToolFirmwareOption.UpdateOptions"
|
||||
value="ToolFirmwareOption.UseLatest"/>
|
||||
<property key="ToolFirmwareToolPack"
|
||||
value="Press to select which tool pack to use"/>
|
||||
<property key="communication.activationmode" value="nohv"/>
|
||||
<property key="communication.interface" value="updi"/>
|
||||
<property key="communication.interface.jtag" value="2wire"/>
|
||||
<property key="communication.speed" value="0.250"/>
|
||||
<property key="debugoptions.debug-startup" value="Use system settings"/>
|
||||
<property key="debugoptions.reset-behaviour" value="Use system settings"/>
|
||||
<property key="debugoptions.useswbreakpoints" value="false"/>
|
||||
<property key="event.recorder.debugger.behavior" value="Running"/>
|
||||
<property key="event.recorder.enabled" value="false"/>
|
||||
<property key="event.recorder.scvd.files" value=""/>
|
||||
<property key="hwtoolclock.frcindebug" value="false"/>
|
||||
<property key="lastid" value=""/>
|
||||
<property key="memories.aux" value="false"/>
|
||||
<property key="memories.bootflash" value="true"/>
|
||||
<property key="memories.configurationmemory" value="true"/>
|
||||
<property key="memories.configurationmemory2" value="true"/>
|
||||
<property key="memories.dataflash" value="true"/>
|
||||
<property key="memories.eeprom" value="true"/>
|
||||
<property key="memories.exclude.configurationmemory" value="true"/>
|
||||
<property key="memories.flashdata" value="true"/>
|
||||
<property key="memories.id" value="true"/>
|
||||
<property key="memories.instruction.ram.ranges"
|
||||
value="${memories.instruction.ram.ranges}"/>
|
||||
<property key="memories.programmemory" value="true"/>
|
||||
<property key="memories.programmemory.ranges" value="0-7ff"/>
|
||||
<property key="poweroptions.powerenable" value="true"/>
|
||||
<property key="programmerToGoFilePath"
|
||||
value="C:/Users/Lenovo/MPLABXProjects/fg004a.X/debug/default/fg004a_ptg"/>
|
||||
<property key="programmerToGoImageName" value="fg004a_ptg"/>
|
||||
<property key="programoptions.donoteraseauxmem" value="false"/>
|
||||
<property key="programoptions.eraseb4program" value="true"/>
|
||||
<property key="programoptions.ledbrightness" value="5"/>
|
||||
<property key="programoptions.pgcconfig" value="pull down"/>
|
||||
<property key="programoptions.pgcresistor.value" value="4.7"/>
|
||||
<property key="programoptions.pgdconfig" value="pull down"/>
|
||||
<property key="programoptions.pgdresistor.value" value="4.7"/>
|
||||
<property key="programoptions.pgmentry.voltage" value="low"/>
|
||||
<property key="programoptions.pgmspeed" value="Med"/>
|
||||
<property key="programoptions.preservedataflash" value="false"/>
|
||||
<property key="programoptions.preserveeeprom" value="false"/>
|
||||
<property key="programoptions.preserveeeprom.ranges" value="1400-147f"/>
|
||||
<property key="programoptions.preserveprogram.ranges" value=""/>
|
||||
<property key="programoptions.preserveprogramrange" value="false"/>
|
||||
<property key="programoptions.preserveuserid" value="false"/>
|
||||
<property key="programoptions.program.otpconfig" value="false"/>
|
||||
<property key="programoptions.programcalmem" value="false"/>
|
||||
<property key="programoptions.programuserotp" value="false"/>
|
||||
<property key="programoptions.smart.program" value="When debugging only"/>
|
||||
<property key="programoptions.testmodeentrymethod" value="VDDFirst"/>
|
||||
<property key="ptgProgramImage" value="true"/>
|
||||
<property key="ptgSendImage" value="true"/>
|
||||
<property key="toolpack.updateoptions"
|
||||
value="toolpack.updateoptions.uselatestoolpack"/>
|
||||
<property key="toolpack.updateoptions.packversion"
|
||||
value="Press to select which tool pack to use"/>
|
||||
<property key="voltagevalue" value="5.0"/>
|
||||
</Tool>
|
||||
<XC8-CO>
|
||||
<property key="coverage-enable" value=""/>
|
||||
<property key="stack-guidance" value="false"/>
|
||||
</XC8-CO>
|
||||
<XC8-config-global>
|
||||
<property key="advanced-elf" value="true"/>
|
||||
<property key="constdata-progmem" value="false"/>
|
||||
<property key="gcc-opt-driver-new" value="true"/>
|
||||
<property key="gcc-opt-std" value="-std=c99"/>
|
||||
<property key="gcc-output-file-format" value="dwarf-3"/>
|
||||
<property key="mapped-progmem" value="false"/>
|
||||
<property key="omit-pack-options" value="false"/>
|
||||
<property key="omit-pack-options-new" value="1"/>
|
||||
<property key="output-file-format" value="-mcof,+elf"/>
|
||||
<property key="smart-io-format" value=""/>
|
||||
<property key="stack-size-high" value="auto"/>
|
||||
<property key="stack-size-low" value="auto"/>
|
||||
<property key="stack-size-main" value="auto"/>
|
||||
<property key="stack-type" value="compiled"/>
|
||||
<property key="user-pack-device-support" value=""/>
|
||||
<property key="wpo-lto" value="false"/>
|
||||
</XC8-config-global>
|
||||
</conf>
|
||||
</confs>
|
||||
</configurationDescriptor>
|
|
@ -0,0 +1,53 @@
|
|||
#
|
||||
#Tue Jul 02 11:57:01 PDT 2024
|
||||
pk4hybrid/CHECK_4_HIGH_VOLTAGE_VPP=false
|
||||
realice/CAL_WARNING=false
|
||||
icd5/CAL_WARNING=false
|
||||
pk4hybrid/DEVID_MISMATCH=false
|
||||
pkobskde/CHECK_4_HIGH_VOLTAGE_VPP=false
|
||||
icd4/SIMULTANEOUS_DEBUG_WARNING=false
|
||||
EmbeddedAssemblySyntax/MULTIPLE_PROJECT_OWNERSHIP=false
|
||||
icd3/CHECK_4_HIGH_VOLTAGE_VPP=false
|
||||
mdbDebugger/MEMORY_VIEW_NO_HW_BP_RESOURCES_WARN=false
|
||||
pk3/DEVID_MISMATCH=false
|
||||
pk4hybrid/EESAVE_DONT_DO_NUTHIN=false
|
||||
pk4hybrid/CANT_HALT_IN_MMD_MODE=false
|
||||
mdbDebugger/NO_HW_COMBINER_RESOURCES_WARNING=false
|
||||
mdbDebugger/MEMORY_VIEW_LAST_HW_BP_RESOURCE_WARN=false
|
||||
pkobskde/CHECK_CLOCK=false
|
||||
pk4hybrid/MCLR_HOLD_RESET_NO_MAINTAIN_POWER=false
|
||||
realice/CHECK_4_HIGH_VOLTAGE_VPP=false
|
||||
mdbDebugger/LAST_HW_BP_RESOURCE_WARN=false
|
||||
realice/DEVID_MISMATCH=false
|
||||
icd4/CAL_WARNING=false
|
||||
icd4/PROGRAM_CFG_WARNING=false
|
||||
icd3/VPP_FIRST_WARNING=false
|
||||
mdbDebugger/SOFTWARE_BREAK_POINT_PREFERENCE=false
|
||||
pkoblicdbgr/DEVID_MISMATCH=false
|
||||
icd5/SIMULTANEOUS_DEBUG_WARNING=false
|
||||
icd5/DEVID_MISMATCH=false
|
||||
icd4/DEVID_MISMATCH=false
|
||||
icd3/CHECK_CLOCK=false
|
||||
icd3/DEVID_MISMATCH=false
|
||||
pk4hybrid/SIMULTANEOUS_DEBUG_WARNING=false
|
||||
pkoblicdbgr/CHECK_4_HIGH_VOLTAGE_VPP=false
|
||||
icd5/CHECK_4_HIGH_VOLTAGE_VPP=false
|
||||
icd4/MCLR_HOLD_RESET_NO_MAINTAIN_POWER=false
|
||||
icd3/CAL_WARNING=false
|
||||
pk3/CHECK_CLOCK=false
|
||||
mdbDebugger/NO_HW_BP_RESOURCES_WARN=false
|
||||
pk4hybrid/CAL_WARNING=false
|
||||
pkoblicdbgr/CHECK_CLOCK=false
|
||||
icd5/MCLR_HOLD_RESET_NO_MAINTAIN_POWER=false
|
||||
pk3/CAL_WARNING=false
|
||||
pkobskde/VPP_FIRST_WARNING=false
|
||||
icd4/CHECK_4_HIGH_VOLTAGE_VPP=false
|
||||
icd4/EESAVE_DONT_DO_NUTHIN=false
|
||||
pk4hybrid/PROGRAM_CFG_WARNING=false
|
||||
icd5/EESAVE_DONT_DO_NUTHIN=false
|
||||
pkobskde/DEVID_MISMATCH=false
|
||||
icd4/CANT_HALT_IN_MMD_MODE=false
|
||||
realice/CHECK_CLOCK=false
|
||||
pk3/CHECK_4_HIGH_VOLTAGE_VPP=false
|
||||
icd5/PROGRAM_CFG_WARNING=false
|
||||
pk3/VPP_FIRST_WARNING=false
|
|
@ -0,0 +1,43 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configurationDescriptor version="65">
|
||||
<projectmakefile>Makefile</projectmakefile>
|
||||
<defaultConf>1</defaultConf>
|
||||
<confs>
|
||||
<conf name="default" type="2">
|
||||
<platformToolSN>:=MPLABComm-USB-Microchip:=<vid>04D8:=<pid>9036:=<rev>0100:=<man>Microchip Technology Incorporated:=<prod>MPLAB PICkit 5:=<sn>020026702RYN031742:=<drv>x:=<xpt>b:=end</platformToolSN>
|
||||
<languageToolchainDir>C:\Program Files\avr-gcc\bin</languageToolchainDir>
|
||||
<mdbdebugger version="1">
|
||||
<placeholder1>place holder 1</placeholder1>
|
||||
<placeholder2>place holder 2</placeholder2>
|
||||
</mdbdebugger>
|
||||
<runprofile version="6">
|
||||
<args></args>
|
||||
<rundir></rundir>
|
||||
<buildfirst>true</buildfirst>
|
||||
<console-type>0</console-type>
|
||||
<terminal-type>0</terminal-type>
|
||||
<remove-instrumentation>0</remove-instrumentation>
|
||||
<environment>
|
||||
</environment>
|
||||
</runprofile>
|
||||
</conf>
|
||||
<conf name="attiny404" type="2">
|
||||
<platformToolSN>:=MPLABComm-USB-Microchip:=<vid>04D8:=<pid>9036:=<rev>0100:=<man>Microchip Technology Incorporated:=<prod>MPLAB PICkit 5:=<sn>020026702RYN031742:=<drv>x:=<xpt>b:=end</platformToolSN>
|
||||
<languageToolchainDir>/opt/microchip/xc8/v2.46/bin</languageToolchainDir>
|
||||
<mdbdebugger version="1">
|
||||
<placeholder1>place holder 1</placeholder1>
|
||||
<placeholder2>place holder 2</placeholder2>
|
||||
</mdbdebugger>
|
||||
<runprofile version="6">
|
||||
<args></args>
|
||||
<rundir></rundir>
|
||||
<buildfirst>true</buildfirst>
|
||||
<console-type>0</console-type>
|
||||
<terminal-type>0</terminal-type>
|
||||
<remove-instrumentation>0</remove-instrumentation>
|
||||
<environment>
|
||||
</environment>
|
||||
</runprofile>
|
||||
</conf>
|
||||
</confs>
|
||||
</configurationDescriptor>
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
|
||||
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
|
||||
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
|
||||
<group/>
|
||||
</open-files>
|
||||
</project-private>
|
|
@ -0,0 +1,29 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://www.netbeans.org/ns/project/1">
|
||||
<type>com.microchip.mplab.nbide.embedded.makeproject</type>
|
||||
<configuration>
|
||||
<data xmlns="http://www.netbeans.org/ns/make-project/1">
|
||||
<name>Relay_Tester</name>
|
||||
<creation-uuid>428c0aa9-0d58-40bd-97a0-d26a5305fcb1</creation-uuid>
|
||||
<make-project-type>0</make-project-type>
|
||||
<sourceEncoding>UTF-8</sourceEncoding>
|
||||
<make-dep-projects/>
|
||||
<sourceRootList>
|
||||
<sourceRootElem>.</sourceRootElem>
|
||||
</sourceRootList>
|
||||
<confList>
|
||||
<confElem>
|
||||
<name>default</name>
|
||||
<type>2</type>
|
||||
</confElem>
|
||||
<confElem>
|
||||
<name>attiny404</name>
|
||||
<type>2</type>
|
||||
</confElem>
|
||||
</confList>
|
||||
<formatting>
|
||||
<project-formatting-style>false</project-formatting-style>
|
||||
</formatting>
|
||||
</data>
|
||||
</configuration>
|
||||
</project>
|
|
@ -0,0 +1,350 @@
|
|||
#!/bin/sh
|
||||
# Author: Jake Goodwin
|
||||
# Date: 2024
|
||||
# Filename: otto.sh
|
||||
|
||||
AVR_TC="$(pwd)/avr-gcc-toolchain.cmake"
|
||||
CMAKE_VERBOSE="ON"
|
||||
CROSS_COMPILE=1
|
||||
TEMPLATE_FILES=".template_files"
|
||||
MODULE_DIR="${TEMPLATE_FILES}/modules"
|
||||
|
||||
|
||||
format_source_code () {
|
||||
#Get a list of all C files
|
||||
source_c_files=$(find ./src -name '*.c')
|
||||
for f in $source_c_files; do
|
||||
clang-format -i -style=file $f
|
||||
done
|
||||
|
||||
#Get a list of all H files
|
||||
source_h_files=$(find ./src -name '*.h')
|
||||
for f in $source_h_files; do
|
||||
clang-format -i -style=file $f
|
||||
done
|
||||
|
||||
echo "Applying Formating standard!"
|
||||
}
|
||||
|
||||
add_compile_commands () {
|
||||
if [ -f ./compile_commands.json ]; then
|
||||
echo "compile_commands.json already exists!\n"
|
||||
else
|
||||
echo "Creating new symlink for compile commands!\n"
|
||||
ln -s ./build/compile_commands.json ./compile_commands.json
|
||||
fi
|
||||
}
|
||||
|
||||
clear_cmake_cache () {
|
||||
cd ./build
|
||||
rm -rf CMakeCache.txt CMakeFiles/
|
||||
}
|
||||
|
||||
|
||||
does_module_exist () {
|
||||
local basename="$1"
|
||||
|
||||
if [ -d "src/${basename}" ]; then
|
||||
echo "1"
|
||||
else
|
||||
echo "0"
|
||||
fi
|
||||
}
|
||||
|
||||
does_mock_exist () {
|
||||
local basename="$1"
|
||||
|
||||
if [ -d "mocks/${basename}" ]; then
|
||||
echo "1"
|
||||
else
|
||||
echo "0"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
add_module_to_cmakes () {
|
||||
local basename="$1"
|
||||
|
||||
echo "add_subdirectory(${basename})" >> ./src/CMakeLists.txt
|
||||
|
||||
# Tests cmake file needs to be edited in place.
|
||||
sed -i'' "s/# TEST_DIRS.*$/# TEST_DIRS\r\nadd_subdirectory(${basename})/g" ./tests/CMakeLists.txt
|
||||
sed -i'' "s/# TEST_LINKS.*$/# TEST_LINKS\r\n\ttest_${basename}/g" ./tests/CMakeLists.txt
|
||||
}
|
||||
|
||||
remove_module_from_cmakes () {
|
||||
local basename="$1"
|
||||
|
||||
sed -i'' "s/^.*add_subdirectory(${basename}).*$//g" ./src/CMakeLists.txt
|
||||
sed -i'' "s/^.*add_subdirectory(${basename}).*$//g" ./tests/CMakeLists.txt
|
||||
sed -i'' "s/^.*test_${basename}.*$//g" ./tests/CMakeLists.txt
|
||||
}
|
||||
|
||||
git_add_module () {
|
||||
|
||||
local basename="$1"
|
||||
|
||||
read -p "Auto add to git?(y/n):" CHOICE
|
||||
if [ "${CHOICE}" = "n" ]; then
|
||||
echo "not being added!"
|
||||
return 0
|
||||
fi
|
||||
|
||||
modsrc_dir="./src/${basename}"
|
||||
modtest_dir="./tests/${basename}"
|
||||
|
||||
# Now we add the new files to the git tracked files
|
||||
git add ${modsrc_dir}/*
|
||||
git add ${modsrc_dir}
|
||||
git add ${modtest_dir}/*
|
||||
git add ${modtest_dir}
|
||||
git add ./src/CMakeLists.txt
|
||||
git add ./tests/CMakeLists.txt
|
||||
}
|
||||
|
||||
|
||||
git_remove_module () {
|
||||
local basename="$1"
|
||||
|
||||
read -p "Auto del from git?(y/n):" CHOICE
|
||||
if [ "${CHOICE}" -eq "n" ]; then
|
||||
echo "not being removed!"
|
||||
return 0
|
||||
fi
|
||||
|
||||
modsrc_dir="./src/${basename}"
|
||||
modtest_dir="./tests/${basename}"
|
||||
|
||||
# Now we add the new files to the git tracked files
|
||||
git rm -r ${modsrc_dir}/*
|
||||
git rm -r ${modsrc_dir}
|
||||
git rm -r ${modtest_dir}/*
|
||||
git rm -r ${modtest_dir}
|
||||
git rm -r ./src/CMakeLists.txt
|
||||
git rm -r ./tests/CMakeLists.txt
|
||||
}
|
||||
|
||||
add_mock_module () {
|
||||
read -p "Enter the name of the module:" modname
|
||||
result=$(does_mock_exist "$modname")
|
||||
|
||||
if [ "${result}" -eq "1" ]; then
|
||||
echo "Module already exists!"
|
||||
echo "Exiting without changing anything"
|
||||
exit
|
||||
fi
|
||||
|
||||
modname_cap=$(echo $modname | sed 's/[a-z]/\U&/g')
|
||||
modsrc_dir="./mocks/${modname}"
|
||||
modtest_dir="./tests/${modname}"
|
||||
|
||||
echo "creating: ${modsrc_dir}, ${modtest_dir}"
|
||||
mkdir $modsrc_dir
|
||||
mkdir $modtest_dir
|
||||
|
||||
#copy the template files.
|
||||
echo "copying & customizing template files..."
|
||||
|
||||
sed "s/module_name/${modname}/" $MODULE_DIR/module_name.c > $modsrc_dir/${modname}.c
|
||||
sed -i'' "3s/todays_date/$(date +%Y)/" $modsrc_dir/${modname}.c
|
||||
|
||||
sed "s/module_name/${modname_cap}/" $MODULE_DIR/module_name.h > $modsrc_dir/${modname}.h
|
||||
sed -i'' "3s/todays_date/$(date +%Y)/" $modsrc_dir/${modname}.h
|
||||
|
||||
sed "s/module_name/${modname}/" $MODULE_DIR/CMakeLists.txt > $modsrc_dir/CMakeLists.txt
|
||||
|
||||
sed "s/module_name/${modname}/" $MODULE_DIR/test_module_name.cpp > $modtest_dir/test_${modname}.cpp
|
||||
sed "s/module_name/${modname}/" $MODULE_DIR/TestCMakeLists.txt > $modtest_dir/CMakeLists.txt
|
||||
|
||||
# Add the module to the cmake lists files.
|
||||
add_module_to_cmakes "${modname}"
|
||||
|
||||
echo "Resulting files/dirs:"
|
||||
tree -L 2 $modsrc_dir
|
||||
tree -L 2 $modtest_dir
|
||||
|
||||
# Now we add the new files to the git tracked files
|
||||
git_add_module "${modname}"
|
||||
|
||||
}
|
||||
|
||||
add_new_module () {
|
||||
read -p "Enter the name of the module:" modname
|
||||
|
||||
result=$(does_module_exist "$modname")
|
||||
|
||||
if [ "${result}" -eq "1" ]; then
|
||||
echo "Module already exists!"
|
||||
echo "Exiting without changing anything"
|
||||
exit
|
||||
fi
|
||||
|
||||
modname_cap=$(echo $modname | sed 's/[a-z]/\U&/g')
|
||||
modsrc_dir="./src/${modname}"
|
||||
modtest_dir="./tests/${modname}"
|
||||
|
||||
echo "creating: ${modsrc_dir}, ${modtest_dir}"
|
||||
mkdir $modsrc_dir
|
||||
mkdir $modtest_dir
|
||||
|
||||
#copy the template files.
|
||||
echo "copying & customizing template files..."
|
||||
|
||||
sed "s/module_name/${modname}/" $MODULE_DIR/module_name.c > $modsrc_dir/${modname}.c
|
||||
sed -i'' "3s/todays_date/$(date +%Y)/" $modsrc_dir/${modname}.c
|
||||
|
||||
sed "s/module_name/${modname_cap}/" $MODULE_DIR/module_name.h > $modsrc_dir/${modname}.h
|
||||
sed -i'' "3s/todays_date/$(date +%Y)/" $modsrc_dir/${modname}.h
|
||||
|
||||
sed "s/module_name/${modname}/" $MODULE_DIR/CMakeLists.txt > $modsrc_dir/CMakeLists.txt
|
||||
|
||||
sed "s/module_name/${modname}/" $MODULE_DIR/test_module_name.cpp > $modtest_dir/test_${modname}.cpp
|
||||
sed "s/module_name/${modname}/" $MODULE_DIR/TestCMakeLists.txt > $modtest_dir/CMakeLists.txt
|
||||
|
||||
# Add the module to the cmake lists files.
|
||||
add_module_to_cmakes "${modname}"
|
||||
|
||||
echo "Resulting files/dirs:"
|
||||
tree -L 2 $modsrc_dir
|
||||
tree -L 2 $modtest_dir
|
||||
|
||||
# Now we add the new files to the git tracked files
|
||||
git_add_module "${modname}"
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
del_module () {
|
||||
read -p "Enter the name of the module:" modname
|
||||
|
||||
rm -r ./tests/${modname}
|
||||
rm -r ./src/${modname}
|
||||
remove_module_from_cmakes "${modname}"
|
||||
}
|
||||
|
||||
cross_compile () {
|
||||
echo "ERROR: Currently no toolchain / target!"
|
||||
}
|
||||
|
||||
build_release() {
|
||||
clear_cmake_cache
|
||||
cmake -DCMAKE_VERBOSE_MAKEFILE=${CMAKE_VERBOSE} ../
|
||||
make
|
||||
}
|
||||
|
||||
build_main () {
|
||||
clear_cmake_cache
|
||||
cmake -DCMAKE_VERBOSE_MAKEFILE=${CMAKE_VERBOSE} ../
|
||||
make main
|
||||
}
|
||||
|
||||
build_hex () {
|
||||
clear_cmake_cache
|
||||
|
||||
CMAKE_ARGS="-DCMAKE_VERBOSE_MAKEFILE=${CMAKE_VERBOSE}"
|
||||
CMAKE_ARGS="${CMAKE_ARGS} -DCMAKE_TOOLCHAIN_FILE=${AVR_TC}"
|
||||
|
||||
cmake ${CMAKE_ARGS} ../
|
||||
make all
|
||||
make hex
|
||||
}
|
||||
|
||||
build_hex_optimized () {
|
||||
clear_cmake_cache
|
||||
|
||||
CMAKE_ARGS="-DCMAKE_VERBOSE_MAKEFILE=${CMAKE_VERBOSE}"
|
||||
CMAKE_ARGS="${CMAKE_ARGS} -DCMAKE_TOOLCHAIN_FILE=${AVR_TC}"
|
||||
|
||||
cmake ${CMAKE_ARGS} ../
|
||||
make all
|
||||
make hex-release
|
||||
}
|
||||
|
||||
flash_avr () {
|
||||
build_hex_optimized
|
||||
make upload
|
||||
}
|
||||
|
||||
run_c_tests () {
|
||||
format_source_code
|
||||
clear_cmake_cache
|
||||
cmake -DUNIT_TESTING=ON -DCMAKE_VERBOSE_MAKEFILE=${CMAKE_VERBOSE} ../
|
||||
make AllTests
|
||||
make Mock_Tests
|
||||
./tests/AllTests -v -c
|
||||
./tests/Mock_Tests -v -c
|
||||
}
|
||||
|
||||
print_menu () {
|
||||
echo "BUILD MENU:"
|
||||
echo "0. Add Mock Module"
|
||||
echo "1. Run Tests"
|
||||
echo "2. Build Project(hex)"
|
||||
echo "3. Build for release(hex)"
|
||||
echo "4. Flash to AVR"
|
||||
echo "5. Add new module to project"
|
||||
echo "6. Delete module from project"
|
||||
echo "7. Exit"
|
||||
}
|
||||
|
||||
|
||||
main() {
|
||||
add_compile_commands
|
||||
valid_choice=false
|
||||
|
||||
while [ "$valid_choice" != true ]; do
|
||||
print_menu
|
||||
read -p "Enter your choice: " choice
|
||||
|
||||
case $choice in
|
||||
0)
|
||||
echo "You selected Option 0"
|
||||
valid_choice=true
|
||||
add_mock_module
|
||||
;;
|
||||
|
||||
1)
|
||||
echo "You selected Option 1"
|
||||
valid_choice=true
|
||||
run_c_tests
|
||||
;;
|
||||
2)
|
||||
echo "You selected Option 2"
|
||||
valid_choice=true
|
||||
build_hex
|
||||
;;
|
||||
3)
|
||||
echo "You selected Option 3"
|
||||
valid_choice=true
|
||||
build_hex_optimized
|
||||
;;
|
||||
4)
|
||||
echo "You selected Option 4"
|
||||
valid_choice=true
|
||||
flash_avr
|
||||
;;
|
||||
5)
|
||||
echo "You selected Option 5"
|
||||
valid_choice=true
|
||||
add_new_module
|
||||
;;
|
||||
6)
|
||||
echo "You selected Option 6"
|
||||
valid_choice=true
|
||||
del_module
|
||||
;;
|
||||
7)
|
||||
echo "Exiting..."
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
echo "Invalid choice. Please select a valid option."
|
||||
;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
main
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,86 @@
|
|||
#!/bin/sh
|
||||
#Author: Jake G
|
||||
#Date: 2024
|
||||
#Filename: setup.sh
|
||||
|
||||
PKG_MNGR=""
|
||||
DEBIAN=0
|
||||
FBSD=0
|
||||
SYSINSTALL=0
|
||||
DEV_UTILS="vim tmux fzf"
|
||||
|
||||
|
||||
install_dev_utils () {
|
||||
ICMD=""
|
||||
if [ $DEBIAN -eq 1 ]; then
|
||||
ICMD="sudo apt install"
|
||||
elif [ $FBSD -eq 1 ]; then
|
||||
ICMD="sudo pkg install"
|
||||
fi
|
||||
|
||||
for util in $DEV_UTILS
|
||||
do
|
||||
${ICMD} ${util}
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
check_os () {
|
||||
if [ -f /etc/debian_version ]; then
|
||||
DEBIAN=1
|
||||
elif [ -f /etc/freebsd-update.conf ]; then
|
||||
FBSD=1
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
remove_template_examples () {
|
||||
echo "does nothing right now"
|
||||
}
|
||||
|
||||
|
||||
install_needed_dependencies () {
|
||||
# Check the OS
|
||||
echo "checking the OS..."
|
||||
# If it's debian based then apt install
|
||||
|
||||
# If it's freeBSD then pkg
|
||||
|
||||
# If it's windows....you're SOL
|
||||
}
|
||||
|
||||
|
||||
create_project_symlinks () {
|
||||
# Allows the clangd LSP to find it.
|
||||
ln -s ./build/compile_commands.json ./compile_commands.json
|
||||
}
|
||||
|
||||
|
||||
build_cpputest () {
|
||||
git submodule add https://github.com/cpputest/cpputest.git
|
||||
git sumodule status
|
||||
cd ./cpputest/build
|
||||
cmake ../
|
||||
|
||||
if [ SYSINSTALL -eq 1]; then
|
||||
make install
|
||||
else
|
||||
make
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
# The default setup stuff.
|
||||
default () {
|
||||
remove_template_examples
|
||||
install_needed_dependencies
|
||||
create_project_symlinks
|
||||
}
|
||||
|
||||
setup() {
|
||||
echo "Setting up env"
|
||||
check_os
|
||||
install_dev_utils
|
||||
}
|
||||
|
||||
setup
|
|
@ -0,0 +1,55 @@
|
|||
add_executable(${PROJECT_NAME}
|
||||
main.c
|
||||
)
|
||||
|
||||
target_link_libraries(${PROJECT_NAME}
|
||||
RegEdit
|
||||
timer
|
||||
LedController
|
||||
)
|
||||
|
||||
# Ensure the build rules are defined
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES SUFFIX ".elf")
|
||||
|
||||
if(NOT TARGET size)
|
||||
# Set the size utility to display the size of the final binary
|
||||
add_custom_target(size ALL
|
||||
COMMAND ${CMAKE_SIZE} --format=avr --mcu=${AVR_MCU} ${CMAKE_PROJECT_NAME}.elf
|
||||
DEPENDS ${CMAKE_PROJECT_NAME}.elf
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
if(NOT TARGET hex)
|
||||
# Define how to convert ELF to HEX
|
||||
add_custom_target(hex ALL
|
||||
COMMAND ${CMAKE_OBJCOPY} -O ihex -R .eeprom ${CMAKE_PROJECT_NAME}.elf ${CMAKE_PROJECT_NAME}.hex
|
||||
DEPENDS ${CMAKE_PROJECT_NAME}.elf
|
||||
)
|
||||
endif()
|
||||
|
||||
if(NOT TARGET bin)
|
||||
# Define how to convert ELF to BIN
|
||||
add_custom_target(bin ALL
|
||||
COMMAND ${CMAKE_OBJCOPY} -O binary -R .eeprom ${CMAKE_PROJECT_NAME}.elf ${CMAKE_PROJECT_NAME}.bin
|
||||
DEPENDS ${CMAKE_PROJECT_NAME}.elf
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
if(NOT TARGET upload)
|
||||
# Upload command (adjust according to your programmer)
|
||||
add_custom_target(upload ALL
|
||||
COMMAND avrdude -c ${PROGRAMMER} -P ${PORT} -p ${AVR_MCU} -U flash:w:${CMAKE_PROJECT_NAME}.hex
|
||||
DEPENDS hex
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
add_subdirectory(RegEdit)
|
||||
add_subdirectory(usart)
|
||||
add_subdirectory(timer)
|
||||
add_subdirectory(LedController)
|
|
@ -0,0 +1,7 @@
|
|||
add_library(LedController STATIC
|
||||
LedController.c
|
||||
)
|
||||
|
||||
target_include_directories(LedController PUBLIC
|
||||
${CMAKE_CURRENT_LIST_DIR}
|
||||
)
|
|
@ -0,0 +1,54 @@
|
|||
/*
|
||||
* Author: Jake G
|
||||
* Date: 2024
|
||||
* filename: LedController.c
|
||||
* description: Abstract LED interface and control.
|
||||
*/
|
||||
|
||||
#ifndef __AVR_ATtiny404__
|
||||
#define __AVR_ATtiny404__
|
||||
#endif
|
||||
|
||||
#include "LedController.h"
|
||||
#include "avr/io.h"
|
||||
|
||||
#define LED_BM_PORTA (1 << 6) | (1 << 1) | (1 << 2) | (1 << 3)
|
||||
#define LED_BM_PORTB (1 << 3) | (1 << 2) | (1 << 0) | (1 << 1)
|
||||
|
||||
LedByte LedController_New(uint8_t *port) {
|
||||
LedByte led_byte;
|
||||
for (int i = 0; i < 8; i++) {
|
||||
led_byte.leds[i].pin_num = i;
|
||||
led_byte.leds[i].state = false;
|
||||
led_byte.leds[i].port = port;
|
||||
}
|
||||
return led_byte;
|
||||
}
|
||||
|
||||
void LedController_ShowByte(LedByte *led_byte, uint8_t byte) {
|
||||
for (int i = 0; i < 8; i++) {
|
||||
if (byte & (1 << i)) {
|
||||
LedController_SetHigh(&led_byte->leds[i]);
|
||||
} else {
|
||||
LedController_SetLow(&led_byte->leds[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LedControler_ClearByte(LedByte *led_byte) {
|
||||
for (int i = 0; i < 8; i++) {
|
||||
LedController_SetLow(&led_byte->leds[i]);
|
||||
}
|
||||
}
|
||||
|
||||
void LedController_SetHigh(Led *led) {
|
||||
*led->port |= (1 << led->pin_num);
|
||||
led->state = true;
|
||||
return;
|
||||
}
|
||||
|
||||
void LedController_SetLow(Led *led) {
|
||||
*led->port &= ~(1 << led->pin_num);
|
||||
led->state = false;
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,59 @@
|
|||
/**
|
||||
* @brief Led Controller module
|
||||
* @details This file outputs a byte of data to the pins for led indication.
|
||||
* @author Jake G
|
||||
* @date 2024-08-21
|
||||
* @copyright None
|
||||
* @file LEDCONTROLLER.h
|
||||
*/
|
||||
|
||||
#ifndef LEDCONTROLLER
|
||||
#define LEDCONTROLLER
|
||||
|
||||
#include "stdbool.h"
|
||||
#include <stdint.h>
|
||||
|
||||
/**
|
||||
* A structure representing an LED
|
||||
*/
|
||||
typedef struct Led {
|
||||
volatile uint8_t *port;
|
||||
uint8_t pin_num;
|
||||
bool state;
|
||||
} Led;
|
||||
|
||||
typedef struct LedByte {
|
||||
Led leds[8];
|
||||
} LedByte;
|
||||
|
||||
/**
|
||||
* Returns a instance of the LedByte structure.
|
||||
*/
|
||||
LedByte LedController_New(uint8_t *port);
|
||||
|
||||
/**
|
||||
* Displays the byte of data via led pins.
|
||||
* @param led_byte A pointer to a LedByte structure.
|
||||
* @param byte A uint8_t representing the byte to be displayed.
|
||||
*/
|
||||
void LedController_ShowByte(LedByte *led_byte, uint8_t byte);
|
||||
|
||||
/**
|
||||
* Clears out the byte led representation
|
||||
* @param led_byte A pointer to the LedByte structure.
|
||||
*/
|
||||
void LedControler_ClearByte(LedByte *led_byte);
|
||||
|
||||
/**
|
||||
* Sets a AVR Led to High/on.
|
||||
* @param led Pointer to an Led structure.
|
||||
*/
|
||||
void LedController_SetHigh(Led *led);
|
||||
|
||||
/**
|
||||
* Sets a AVR Led to Low/off.
|
||||
* @param led Pointer to an Led structure.
|
||||
*/
|
||||
void LedController_SetLow(Led *led);
|
||||
|
||||
#endif // LEDCONTROLLER
|
|
@ -0,0 +1,7 @@
|
|||
add_library(RegEdit STATIC
|
||||
RegEdit.c
|
||||
)
|
||||
|
||||
target_include_directories(RegEdit PUBLIC
|
||||
${CMAKE_CURRENT_LIST_DIR}
|
||||
)
|
|
@ -0,0 +1,53 @@
|
|||
/*
|
||||
* Author: username
|
||||
* Date: 2024
|
||||
* filename: RegEdit.c
|
||||
* description: module_purpose
|
||||
*/
|
||||
|
||||
#include "RegEdit.h"
|
||||
|
||||
void RegEdit_SetRegister(void *reg) {
|
||||
uint8_t *reg_ptr = (uint8_t *)reg;
|
||||
*reg_ptr = 0xFF;
|
||||
}
|
||||
|
||||
void RegEdit_ClearRegister(void *reg) {
|
||||
uint8_t *reg_ptr = (uint8_t *)reg;
|
||||
*reg_ptr = 0x00;
|
||||
}
|
||||
|
||||
void RegEdit_SetBit(void *reg, uint8_t bit_num) {
|
||||
uint8_t *reg_ptr = (uint8_t *)reg;
|
||||
*reg_ptr |= (uint8_t)(1 << bit_num);
|
||||
}
|
||||
|
||||
void RegEdit_ClearBit(void *reg, uint8_t bit_num) {
|
||||
uint8_t *reg_ptr = (uint8_t *)reg;
|
||||
*reg_ptr &= ~(1 << bit_num);
|
||||
}
|
||||
|
||||
bool RegEdit_IsBitSet(void *reg, uint8_t bit_num) {
|
||||
uint8_t *reg_ptr = (uint8_t *)reg;
|
||||
return *reg_ptr & (1 << bit_num);
|
||||
}
|
||||
|
||||
void RegEdit_OR_Num(void *reg, uint8_t num) {
|
||||
uint8_t *reg_ptr = (uint8_t *)reg;
|
||||
*reg_ptr |= num;
|
||||
}
|
||||
|
||||
void RegEdit_AND_Num(void *reg, uint8_t num) {
|
||||
uint8_t *reg_ptr = (uint8_t *)reg;
|
||||
*reg_ptr &= num;
|
||||
}
|
||||
|
||||
void RegEdit_SetNum(void *reg, uint8_t num) {
|
||||
uint8_t *reg_ptr = (uint8_t *)reg;
|
||||
*reg_ptr = num;
|
||||
}
|
||||
|
||||
uint8_t RegEdit_ReadReg(void *reg) {
|
||||
uint8_t *reg_ptr = (uint8_t *)reg;
|
||||
return *reg_ptr;
|
||||
}
|
|
@ -0,0 +1,77 @@
|
|||
/**
|
||||
* @brief Register Editing Interface
|
||||
* @details This file is an abstraction to all the bitwise operations
|
||||
* @author Jake G
|
||||
* @date 2024
|
||||
* @copyright None
|
||||
* @file MockRegEdit.h
|
||||
*/
|
||||
|
||||
#ifndef REGEDIT_H
|
||||
#define REGEDIT_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
/**
|
||||
*
|
||||
* @param reg The register address.
|
||||
*/
|
||||
void RegEdit_SetRegister(void *reg);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param reg The register address.
|
||||
*/
|
||||
void RegEdit_ClearRegister(void *reg);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param reg The register address.
|
||||
* @param bit_num The bit location.
|
||||
*/
|
||||
void RegEdit_SetBit(void *reg, uint8_t bit_num);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param reg The register address.
|
||||
* @param bit_num The bit location.
|
||||
*/
|
||||
void RegEdit_ClearBit(void *reg, uint8_t bit_num);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param reg The register address.
|
||||
* @param bit_num The bit location.
|
||||
* @return
|
||||
*/
|
||||
bool RegEdit_IsBitSet(void *reg, uint8_t bit_num);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param reg The register address.
|
||||
* @param num The bit location.
|
||||
*/
|
||||
void RegEdit_OR_Num(void *reg, uint8_t num);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param reg The register address.
|
||||
* @param num The bit location.
|
||||
*/
|
||||
void RegEdit_AND_Num(void *reg, uint8_t num);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param reg The register address.
|
||||
* @param num The bit location.
|
||||
*/
|
||||
void RegEdit_SetNum(void *reg, uint8_t num);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param reg The register address.
|
||||
*/
|
||||
uint8_t RegEdit_ReadReg(void *reg);
|
||||
|
||||
#endif // REGEDIT_H
|
|
@ -0,0 +1,148 @@
|
|||
/**
|
||||
* @file main.c
|
||||
* @author Jake G
|
||||
* @date 15 June 2024
|
||||
* @brief File contains the main function.
|
||||
*
|
||||
* This file contains the main logic loop and exists to setup the values
|
||||
* specific to the micro-controller. All other functions and configuration are
|
||||
* extracted into separate source files and headers for configuration.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#define F_CPU 3333333UL
|
||||
|
||||
// This can prevent issues with utils/delay.h library with the gcc toolchain
|
||||
#define __DELAY_BACKWARD_COMPATIBLE__
|
||||
|
||||
#include "LedController.h"
|
||||
#include "RegEdit.h"
|
||||
#include "config.h"
|
||||
#include "timer.h"
|
||||
#include <avr/cpufunc.h> /* Required header file */
|
||||
#include <avr/io.h>
|
||||
#include <util/delay.h>
|
||||
|
||||
#define SW1PIN (1 << 5)
|
||||
#define SW2PIN (1 << 4)
|
||||
#define RELAYPIN (1 << 7)
|
||||
#define RELAYREADINGPIN \
|
||||
(1 << 6) // It would be better to use PA7 so USART worked
|
||||
|
||||
//#define LED_BM_PORTA (1 << 6)|(1 << 1)|(1 << 2)|(1 << 3)
|
||||
#define LED_BM_PORTA (1 << 1) | (1 << 2) | (1 << 3)
|
||||
#define LED_BM_PORTB (1 << 3) | (1 << 2) | (1 << 0) | (1 << 1)
|
||||
|
||||
// Set the function pointer for the delay func
|
||||
void (*Delay_MicroSeconds)(double us) = _delay_us;
|
||||
|
||||
void SW1_Wait(void) {
|
||||
// poll the input.
|
||||
while (PORTA.IN & SW1PIN) {
|
||||
}
|
||||
}
|
||||
|
||||
void SW2_Wait(void) {
|
||||
// poll the input.
|
||||
while (PORTA.IN & SW2PIN) {
|
||||
}
|
||||
}
|
||||
|
||||
void Activate_Relay(void) { PORTA.OUT |= RELAYPIN; }
|
||||
|
||||
void Deactivate_Relay(void) { PORTA.OUT &= ~RELAYPIN; }
|
||||
|
||||
void WaitForRelayConnect(void) {
|
||||
while (!(PORTA.IN & RELAYREADINGPIN)) {
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
void WaitForRelayDisconnect(void) {
|
||||
while (PORTA.IN & RELAYREADINGPIN) {
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
void LedSetup(LedByte *led_byte) {
|
||||
PORTA.DIR |= LED_BM_PORTA;
|
||||
PORTB.DIR |= LED_BM_PORTB;
|
||||
|
||||
// pin 13, bit 0, PA3
|
||||
led_byte->leds[0].port = (void *)&PORTA.OUT;
|
||||
led_byte->leds[0].pin_num = 3;
|
||||
|
||||
// pin 12, bit 1, PA2
|
||||
led_byte->leds[1].port = &PORTA.OUT;
|
||||
led_byte->leds[1].pin_num = 2;
|
||||
|
||||
// pin 11, bit 2, PA1
|
||||
led_byte->leds[2].port = &PORTA.OUT;
|
||||
led_byte->leds[2].pin_num = 1;
|
||||
|
||||
// pin 9, bit 3, PB0
|
||||
led_byte->leds[3].port = &PORTB.OUT;
|
||||
led_byte->leds[3].pin_num = 0;
|
||||
|
||||
// pin 8, bit 4, PB1
|
||||
led_byte->leds[4].port = &PORTB.OUT;
|
||||
led_byte->leds[4].pin_num = 1;
|
||||
|
||||
// pin 2, bit 5, PB2
|
||||
led_byte->leds[5].port = &PORTB.OUT;
|
||||
led_byte->leds[5].pin_num = 2;
|
||||
|
||||
// pin 3, bit 6, PB3
|
||||
led_byte->leds[6].port = &PORTB.OUT;
|
||||
led_byte->leds[6].pin_num = 3;
|
||||
|
||||
// pin 3, bit 7, PA6
|
||||
led_byte->leds[7].port = &PORTA.OUT;
|
||||
// led_byte->leds[7].pin_num = 6;
|
||||
led_byte->leds[7].pin_num = 3;
|
||||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
// We use pin 10 which is the UDPI/RESET pin.
|
||||
// This means we have to change it's mode.
|
||||
|
||||
PORTA.DIR |= RELAYPIN;
|
||||
PORTA.DIR &= ~RELAYREADINGPIN;
|
||||
PORTA.DIR &= ~SW1PIN;
|
||||
PORTA.DIR &= ~SW2PIN;
|
||||
|
||||
uint16_t make_time = 0;
|
||||
uint16_t break_time = 0;
|
||||
uint8_t temp = 0;
|
||||
|
||||
LedByte led_byte = LedController_New(&PORTA.OUT);
|
||||
LedSetup(&led_byte);
|
||||
|
||||
while (true) {
|
||||
SW1_Wait();
|
||||
Activate_Relay();
|
||||
|
||||
Timer_Start();
|
||||
WaitForRelayConnect();
|
||||
Timer_Disable();
|
||||
|
||||
make_time = Timer_GetOverflowCount();
|
||||
|
||||
// Output the Make time via LEDS
|
||||
temp = (uint8_t)(make_time & 0xFF);
|
||||
LedController_ShowByte(&led_byte, temp);
|
||||
|
||||
SW2_Wait();
|
||||
Deactivate_Relay();
|
||||
|
||||
Timer_Start();
|
||||
WaitForRelayDisconnect();
|
||||
Timer_Disable();
|
||||
|
||||
break_time = Timer_GetOverflowCount();
|
||||
|
||||
// Output the Break time via LEDS
|
||||
temp = (uint8_t)(break_time & 0xFF);
|
||||
LedController_ShowByte(&led_byte, temp);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
add_library(timer STATIC
|
||||
timer.c
|
||||
)
|
||||
|
||||
target_include_directories(timer PUBLIC
|
||||
${CMAKE_CURRENT_LIST_DIR}
|
||||
)
|
||||
|
||||
if(UNIT_TESTING)
|
||||
target_link_libraries(timer
|
||||
MockRegEdit
|
||||
)
|
||||
else()
|
||||
target_link_libraries(timer
|
||||
RegEdit
|
||||
)
|
||||
endif()
|
|
@ -0,0 +1,75 @@
|
|||
/**
|
||||
* @brief PUT_TEXT_HERE
|
||||
* @details This file is...
|
||||
* @author username
|
||||
* @date todays_date
|
||||
* @copyright None
|
||||
* @file module_name.h
|
||||
*/
|
||||
|
||||
// Used during testing and for the LSP
|
||||
#ifndef __AVR_ATtiny404__
|
||||
#define __AVR_ATtiny404__
|
||||
#endif
|
||||
|
||||
#include "timer.h"
|
||||
#include <avr/interrupt.h>
|
||||
#include <avr/io.h>
|
||||
|
||||
#define FCLK_PER 3333333UL
|
||||
#define DIV8 0x3
|
||||
#define PERIOD_VALUE 40
|
||||
|
||||
// These are expiremential found values that account for overhead
|
||||
// for smaller durations.
|
||||
#define OVERHEAD_ONE 226
|
||||
#define OVERHEAD_TWO 151
|
||||
#define OVERHEAD_THREE 75
|
||||
|
||||
static uint16_t overflow_count = 0;
|
||||
|
||||
uint16_t Timer_GetOverflowCount(void) { return overflow_count; }
|
||||
|
||||
void Timer_Start(void) {
|
||||
// clear the overflow event count
|
||||
overflow_count = 0;
|
||||
|
||||
sei();
|
||||
|
||||
// Enable the overflow Interrupt.
|
||||
TCA0.SINGLE.INTCTRL = TCA_SINGLE_OVF_bm;
|
||||
|
||||
// set Normal mode.
|
||||
TCA0.SINGLE.CTRLB = TCA_SINGLE_WGMODE_NORMAL_gc;
|
||||
|
||||
// Disable event counting.
|
||||
TCA0.SINGLE.EVCTRL &= ~(TCA_SINGLE_CNTEI_bm);
|
||||
|
||||
// Set the Period Value
|
||||
TCA0.SINGLE.PER = PERIOD_VALUE;
|
||||
|
||||
// set the Timer to divide FCLK_PER by 8.
|
||||
TCA0.SINGLE.CTRLA |= (DIV8 << 1);
|
||||
|
||||
// Enable the Timer
|
||||
TCA0.SINGLE.CTRLA |= TCA_SINGLE_ENABLE_bm;
|
||||
}
|
||||
|
||||
void Timer_Disable(void) {
|
||||
cli();
|
||||
TCA0.SINGLE.CTRLA &= ~(1 << 0);
|
||||
TCA0.SINGLE.CTRLESET |= ((0x3) << 2);
|
||||
}
|
||||
|
||||
// Triggered on the overflow of the timer A's counter.
|
||||
ISR(TCA0_OVF_vect) {
|
||||
cli();
|
||||
|
||||
// Increment the Overflow counter.
|
||||
overflow_count += 1;
|
||||
|
||||
// The interrupt flag has to be cleared manually
|
||||
TCA0.SINGLE.INTFLAGS = TCA_SINGLE_OVF_bm;
|
||||
|
||||
sei();
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
/**
|
||||
* @brief The AVR Timer module
|
||||
* @details This file is used to interact with the hardware timers.
|
||||
* @author Jake G
|
||||
* @date 2024
|
||||
* @copyright None
|
||||
* @file TIMER.h
|
||||
*/
|
||||
|
||||
#ifndef TIMER
|
||||
#define TIMER
|
||||
|
||||
#include "inttypes.h"
|
||||
#include "stdbool.h"
|
||||
|
||||
/**
|
||||
*
|
||||
* @param a The first argument
|
||||
*/
|
||||
|
||||
void Timer_Start(void);
|
||||
|
||||
void Timer_Disable(void);
|
||||
|
||||
uint16_t Timer_GetOverflowCount(void);
|
||||
|
||||
#endif // TIMER
|
|
@ -0,0 +1,7 @@
|
|||
add_library(usart STATIC
|
||||
usart.c
|
||||
)
|
||||
|
||||
target_include_directories(usart PUBLIC
|
||||
${CMAKE_CURRENT_LIST_DIR}
|
||||
)
|
|
@ -0,0 +1,81 @@
|
|||
/*
|
||||
* Author: username
|
||||
* Date: 2024
|
||||
* filename: usart.c
|
||||
* description: module_purpose
|
||||
*/
|
||||
|
||||
#ifndef __AVR_ATtiny404__
|
||||
#define __AVR_ATtiny404__
|
||||
#endif
|
||||
|
||||
#include "usart.h"
|
||||
#include <avr/io.h>
|
||||
#include <string.h>
|
||||
|
||||
// These are technically correct, but the libc requires F_CPU for delay stuff
|
||||
// that doesn't match the actual F_CPU because it uses the value after the
|
||||
// clock is divided.
|
||||
|
||||
// #define F_CPU 3333333UL
|
||||
// #define F_PER F_CPU / 6
|
||||
|
||||
#define F_PER 3333333UL
|
||||
#define USART0_BAUD_RATE(BAUD_RATE) \
|
||||
((float)(F_PER * 64 / (16 * (float)BAUD_RATE)) + 0.5)
|
||||
|
||||
// RX PIN6, TX PIN7
|
||||
// ALT: RX PIN12 TX PIN11
|
||||
void USART0_Init(void) {
|
||||
// Config TxD as output, and rx as input?
|
||||
PORTB.DIR &= ~(1 << 3);
|
||||
PORTB.DIR |= (1 << 2);
|
||||
|
||||
// It says to set the TX pin high?
|
||||
// PORTB.OUT |= (1<<2);
|
||||
|
||||
// set buad rate.
|
||||
USART0.BAUD = (uint16_t)USART0_BAUD_RATE(9600);
|
||||
// USART0.BAUD = 1388;
|
||||
|
||||
// set the frame format.
|
||||
USART0.CTRLC = 0x3; // setting 8-bit mode.
|
||||
|
||||
// Enable transmitter and receiver (USARTn.CTRLB)
|
||||
// USART0.CTRLB |= (1<<7)|(1<<6);
|
||||
USART0.CTRLB |= USART_TXEN_bm;
|
||||
}
|
||||
|
||||
void USART0_Alt_Init(void) {
|
||||
// setup Alternate pints on PA1 and PA2
|
||||
PORTMUX.CTRLB |= PORTMUX_USART0_ALTERNATE_gc;
|
||||
PORTA.DIR |= (1 << 1);
|
||||
PORTA.DIR &= ~(1 << 2);
|
||||
|
||||
// It says to set the TX pin high?
|
||||
// PORTA.OUT |= (1<<11);
|
||||
|
||||
// set buad rate.
|
||||
USART0.BAUD = (uint16_t)USART0_BAUD_RATE(9600);
|
||||
|
||||
// set the frame format.
|
||||
USART0.CTRLC = 0x3; // setting 8-bit mode.
|
||||
|
||||
// Enable transmitter and receiver (USARTn.CTRLB)
|
||||
// USART0.CTRLB |= (1<<7)|(1<<6);
|
||||
USART0.CTRLB |= USART_TXEN_bm;
|
||||
}
|
||||
|
||||
void USART0_sendChar(char c) {
|
||||
while (!(USART0.STATUS & USART_DREIF_bm)) {
|
||||
;
|
||||
}
|
||||
USART0.TXDATAL = c;
|
||||
USART0.TXDATAH = c;
|
||||
}
|
||||
|
||||
void USART0_sendString(char *str) {
|
||||
for (size_t i = 0; i < strlen(str); i++) {
|
||||
USART0_sendChar(str[i]);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
/**
|
||||
* @brief Universal Asynchronout Serial library.
|
||||
* @details This file contains the functions for using the avr usart0 periph.
|
||||
* @author Jake G
|
||||
* @date 2024
|
||||
* @copyright None
|
||||
* @file USART.h
|
||||
*/
|
||||
|
||||
#ifndef USART_H
|
||||
#define USART_H
|
||||
|
||||
/**
|
||||
* @brief Initializes the USART0 peripheral.
|
||||
*/
|
||||
void USART0_Init(void);
|
||||
|
||||
/**
|
||||
* @brief Initializes the USART0 peripheral on Alternate pins.
|
||||
*/
|
||||
void USART0_Alt_Init(void);
|
||||
|
||||
/**
|
||||
* @brief Sends a single char type variable over usart0.
|
||||
* @param c The charecter to be sent over usart0.
|
||||
*/
|
||||
void USART0_sendChar(char c);
|
||||
|
||||
/**
|
||||
* @brief Sends string over usart0
|
||||
* @param str A C-style string.
|
||||
*/
|
||||
void USART0_sendString(char *str);
|
||||
|
||||
#endif // USART_H
|
|
@ -0,0 +1,15 @@
|
|||
#include "CppUTest/CommandLineTestRunner.h"
|
||||
|
||||
|
||||
//ImportTestGroups
|
||||
IMPORT_TEST_GROUP(simple_test);
|
||||
IMPORT_TEST_GROUP(test_RegEdit);
|
||||
IMPORT_TEST_GROUP(test_LedController);
|
||||
|
||||
|
||||
//START: main
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
return RUN_ALL_TESTS(argc, argv);
|
||||
}
|
||||
//END: main
|
|
@ -0,0 +1,39 @@
|
|||
project(Tests)
|
||||
|
||||
# TEST_DIRS
|
||||
#add_subdirectory(timer)
|
||||
#add_subdirectory(usart)
|
||||
add_subdirectory(MockRegEdit)
|
||||
add_subdirectory(RegEdit)
|
||||
add_subdirectory(simple_test)
|
||||
add_subdirectory(LedController)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# TEST_RUNNER
|
||||
add_executable(AllTests
|
||||
AllTests.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(AllTests
|
||||
${CPPUTEST_LIBRARIES}/libCppUTest.a
|
||||
${CPPUTEST_LIBRARIES}/libCppUTestExt.a
|
||||
# TEST_LINKS
|
||||
test_LedController
|
||||
#test_timer
|
||||
test_RegEdit
|
||||
simple_test
|
||||
)
|
||||
|
||||
|
||||
add_executable(Mock_Tests
|
||||
MockTests.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(Mock_Tests
|
||||
${CPPUTEST_LIBRARIES}/libCppUTest.a
|
||||
${CPPUTEST_LIBRARIES}/libCppUTestExt.a
|
||||
test_MockRegEdit
|
||||
)
|
|
@ -0,0 +1,10 @@
|
|||
# TEST_RUNNER
|
||||
add_library(test_LedController
|
||||
test_LedController.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(test_LedController
|
||||
${CPPUTEST_LIBRARIES}/libCppUTest.a
|
||||
${CPPUTEST_LIBRARIES}/libCppUTestExt.a
|
||||
LedController
|
||||
)
|
|
@ -0,0 +1,161 @@
|
|||
/*
|
||||
* Author: username
|
||||
* Date: todays_date
|
||||
* filename: test_LedController.c
|
||||
* description: module_purpose
|
||||
*/
|
||||
|
||||
#include "CppUTest/CommandLineTestRunner.h"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
#include "LedController.h"
|
||||
}
|
||||
|
||||
TEST_GROUP(test_LedController)
|
||||
{
|
||||
void setup()
|
||||
{
|
||||
|
||||
}
|
||||
void teardown()
|
||||
{
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
TEST(test_LedController, selftest)
|
||||
{
|
||||
CHECK_TRUE(true);
|
||||
}
|
||||
|
||||
|
||||
TEST(test_LedController, LedSetHighWorks)
|
||||
{
|
||||
uint8_t fake_port = 0x00;
|
||||
|
||||
Led fake_led;
|
||||
fake_led.port = &fake_port;
|
||||
fake_led.pin_num = 0;
|
||||
fake_led.state = false;
|
||||
|
||||
LedController_SetHigh(&fake_led);
|
||||
|
||||
//Check that it sets the correct bit.
|
||||
CHECK_TRUE(fake_port & 0x01);
|
||||
|
||||
//It should set the state to true.
|
||||
CHECK_TRUE(fake_led.state);
|
||||
|
||||
//Only the first bit should have been set
|
||||
CHECK_TRUE(fake_port == 0x01);
|
||||
}
|
||||
|
||||
TEST(test_LedController, LedSetHighMaintainsPortState)
|
||||
{
|
||||
uint8_t fake_port = 0x00;
|
||||
|
||||
Led fake_led;
|
||||
fake_led.port = &fake_port;
|
||||
fake_led.pin_num = 0;
|
||||
fake_led.state = false;
|
||||
|
||||
Led led_two;
|
||||
led_two.pin_num = 1;
|
||||
led_two.port = &fake_port;
|
||||
led_two.state = false;
|
||||
|
||||
LedController_SetHigh(&fake_led);
|
||||
LedController_SetHigh(&led_two);
|
||||
|
||||
CHECK_TRUE(fake_port & 0x01);
|
||||
CHECK_TRUE(fake_port & 0x02);
|
||||
}
|
||||
|
||||
TEST(test_LedController, LedSetLow)
|
||||
{
|
||||
uint8_t fake_port = 0x01;
|
||||
|
||||
Led fake_led;
|
||||
fake_led.port = &fake_port;
|
||||
fake_led.pin_num = 0;
|
||||
fake_led.state = true;
|
||||
|
||||
LedController_SetLow(&fake_led);
|
||||
|
||||
CHECK_EQUAL(0x00, fake_port);
|
||||
CHECK_EQUAL(false, fake_led.state);
|
||||
}
|
||||
|
||||
/*
|
||||
* what's the best way to handle an array of 8 leds. Should they
|
||||
* reside in a structure? Or should it just be an array that the user defines?
|
||||
*/
|
||||
TEST(test_LedController, NewLedByte)
|
||||
{
|
||||
uint8_t fake_port = 0x00;
|
||||
LedByte led_byte = LedController_New(&fake_port);
|
||||
|
||||
for(int i = 0; i < 8; i++){
|
||||
CHECK_TRUE(led_byte.leds[i].state == false);
|
||||
CHECK_EQUAL(&fake_port, led_byte.leds[i].port);
|
||||
CHECK_EQUAL(false, led_byte.leds[i].state);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
TEST(test_LedController, LedByteDisplay)
|
||||
{
|
||||
uint8_t fake_port = 0x00;
|
||||
uint8_t byte = 0xFF;
|
||||
LedByte led_byte = LedController_New(&fake_port);
|
||||
|
||||
LedController_ShowByte(&led_byte, byte);
|
||||
|
||||
for(int i = 0; i < 8; i++){
|
||||
CHECK_TRUE(led_byte.leds[i].state);
|
||||
}
|
||||
|
||||
CHECK_EQUAL(0xFF, fake_port);
|
||||
|
||||
}
|
||||
|
||||
TEST(test_LedController, LedByteDisplayPattern)
|
||||
{
|
||||
uint8_t fake_port = 0x00;
|
||||
uint8_t byte = 0xAA;
|
||||
LedByte led_byte = LedController_New(&fake_port);
|
||||
|
||||
|
||||
LedController_ShowByte(&led_byte, byte);
|
||||
|
||||
for(int i = 0; i < 8; i++){
|
||||
if(byte & (1<<i)) {
|
||||
CHECK_TRUE(led_byte.leds[i].state);
|
||||
}
|
||||
else {
|
||||
CHECK_TRUE(!led_byte.leds[i].state);
|
||||
}
|
||||
}
|
||||
|
||||
CHECK_EQUAL(0xAA, fake_port);
|
||||
}
|
||||
|
||||
TEST(test_LedController, ClearingLedByteWorks)
|
||||
{
|
||||
uint8_t fake_port = 0xFF;
|
||||
LedByte led_byte = LedController_New(&fake_port);
|
||||
|
||||
for(int i = 0; i < 8; i++){
|
||||
led_byte.leds[i].state = true;
|
||||
}
|
||||
|
||||
LedControler_ClearByte(&led_byte);
|
||||
|
||||
for(int i = 0; i < 8; i++){
|
||||
CHECK_TRUE(!led_byte.leds[i].state);
|
||||
/*loop body*/
|
||||
}
|
||||
|
||||
CHECK_EQUAL(0x00, fake_port);
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
# TEST_RUNNER
|
||||
add_library(test_MockRegEdit
|
||||
test_MockRegEdit.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(test_MockRegEdit
|
||||
${CPPUTEST_LIBRARIES}/libCppUTest.a
|
||||
${CPPUTEST_LIBRARIES}/libCppUTestExt.a
|
||||
MockRegEdit
|
||||
)
|
||||
|
|
@ -0,0 +1,168 @@
|
|||
/*
|
||||
* Author: username
|
||||
* Date: todays_date
|
||||
* filename: test_MockRegEdit.c
|
||||
* description: module_purpose
|
||||
*/
|
||||
|
||||
#include "CppUTest/CommandLineTestRunner.h"
|
||||
#include "CppUTestExt/MockSupport.h"
|
||||
#include <cstdint>
|
||||
|
||||
extern "C"
|
||||
{
|
||||
#include "MockRegEdit.h"
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
TEST_GROUP(test_MockRegEdit)
|
||||
{
|
||||
void setup()
|
||||
{
|
||||
}
|
||||
void teardown()
|
||||
{
|
||||
mock().clear();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
TEST(test_MockRegEdit, RegEdit_ClearRegisterExpectedCallPasses)
|
||||
{
|
||||
uint8_t a;
|
||||
uint8_t *b = &a;
|
||||
|
||||
mock().expectOneCall("RegEdit_ClearRegister")
|
||||
.withPointerParameter("reg", b);
|
||||
|
||||
RegEdit_ClearRegister(b);
|
||||
|
||||
mock().checkExpectations();
|
||||
}
|
||||
|
||||
|
||||
TEST(test_MockRegEdit, RegEdit_SetRegisterExpectedCallPasses)
|
||||
{
|
||||
|
||||
uint8_t a;
|
||||
uint8_t *b = &a;
|
||||
|
||||
mock().expectOneCall("RegEdit_SetRegister")
|
||||
.withPointerParameter("reg", b);
|
||||
|
||||
RegEdit_SetRegister(b);
|
||||
|
||||
mock().checkExpectations();
|
||||
}
|
||||
|
||||
|
||||
TEST(test_MockRegEdit, RegEdit_SetBitExpectedCallPasses)
|
||||
{
|
||||
|
||||
uint8_t a;
|
||||
uint8_t *b = &a;
|
||||
|
||||
mock().expectOneCall("RegEdit_SetBit")
|
||||
.withPointerParameter("reg", b)
|
||||
.withUnsignedIntParameter("bit_num", 5);
|
||||
|
||||
RegEdit_SetBit(b, 5);
|
||||
|
||||
mock().checkExpectations();
|
||||
}
|
||||
|
||||
|
||||
TEST(test_MockRegEdit, RegEdit_ClearBitExpectedCallPasses)
|
||||
{
|
||||
|
||||
uint8_t a;
|
||||
uint8_t *b = &a;
|
||||
|
||||
mock().expectOneCall("RegEdit_ClearBit")
|
||||
.withPointerParameter("reg", b)
|
||||
.withUnsignedIntParameter("bit_num", 5);
|
||||
|
||||
RegEdit_ClearBit(b, 5);
|
||||
|
||||
mock().checkExpectations();
|
||||
}
|
||||
|
||||
TEST(test_MockRegEdit, RegEdit_IsBitSetExpectedCallPasses)
|
||||
{
|
||||
uint8_t a = 0xFF;
|
||||
uint8_t *b = &a;
|
||||
|
||||
mock().expectOneCall("RegEdit_IsBitSet")
|
||||
.withPointerParameter("reg", b)
|
||||
.withUnsignedIntParameter("bit_num", 5)
|
||||
.andReturnValue(true);
|
||||
|
||||
CHECK_TRUE(RegEdit_IsBitSet(b, 5));
|
||||
|
||||
mock().checkExpectations();
|
||||
}
|
||||
|
||||
|
||||
TEST(test_MockRegEdit, RegEdit_IsBitSetExpectedCallPassesWithFalse)
|
||||
{
|
||||
uint8_t a = 0xFF;
|
||||
uint8_t *b = &a;
|
||||
|
||||
mock().expectOneCall("RegEdit_IsBitSet")
|
||||
.withPointerParameter("reg", b)
|
||||
.withUnsignedIntParameter("bit_num", 5)
|
||||
.andReturnValue(false);
|
||||
|
||||
CHECK_FALSE(RegEdit_IsBitSet(b, 5));
|
||||
|
||||
mock().checkExpectations();
|
||||
}
|
||||
|
||||
TEST(test_MockRegEdit, RegEdit_OR_NumExpectedWorks)
|
||||
{
|
||||
uint8_t a = 0xFF;
|
||||
uint8_t *b = &a;
|
||||
|
||||
mock().expectOneCall("RegEdit_OR_Num")
|
||||
.withPointerParameter("reg", b)
|
||||
.withUnsignedIntParameter("num", 0x4)
|
||||
.andReturnValue(false);
|
||||
|
||||
RegEdit_OR_Num(b, 0x4);
|
||||
|
||||
mock().checkExpectations();
|
||||
|
||||
|
||||
}
|
||||
|
||||
TEST(test_MockRegEdit, RegEdit_SetNumPasses)
|
||||
{
|
||||
uint8_t a = 0xFF;
|
||||
uint8_t *b = &a;
|
||||
|
||||
mock().expectOneCall("RegEdit_SetNum")
|
||||
.withPointerParameter("reg", b)
|
||||
.withUnsignedIntParameter("num", 0x4)
|
||||
.andReturnValue(false);
|
||||
|
||||
RegEdit_SetNum(b, 0x4);
|
||||
|
||||
mock().checkExpectations();
|
||||
}
|
||||
|
||||
TEST(test_MockRegEdit, RegEdit_ReadRegPasses)
|
||||
{
|
||||
uint8_t a = 0xFF;
|
||||
uint8_t *b = &a;
|
||||
|
||||
mock().expectOneCall("RegEdit_ReadReg")
|
||||
.withPointerParameter("reg", b)
|
||||
.andReturnValue(0xFF);
|
||||
|
||||
uint8_t reg_val = RegEdit_ReadReg(b);
|
||||
LONGS_EQUAL(0xFF, reg_val);
|
||||
|
||||
mock().checkExpectations();
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
#include "CppUTest/CommandLineTestRunner.h"
|
||||
|
||||
|
||||
//ImportTestGroups
|
||||
IMPORT_TEST_GROUP(test_MockRegEdit);
|
||||
|
||||
//START: main
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
return RUN_ALL_TESTS(argc, argv);
|
||||
}
|
||||
//END: main
|
|
@ -0,0 +1,10 @@
|
|||
# TEST_RUNNER
|
||||
add_library(test_RegEdit
|
||||
test_RegEdit.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(test_RegEdit
|
||||
${CPPUTEST_LIBRARIES}/libCppUTest.a
|
||||
${CPPUTEST_LIBRARIES}/libCppUTestExt.a
|
||||
RegEdit
|
||||
)
|
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* Author: username
|
||||
* Date: todays_date
|
||||
* filename: test_RegEdit.c
|
||||
* description: module_purpose
|
||||
*/
|
||||
|
||||
#include "CppUTest/CommandLineTestRunner.h"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
#include "RegEdit.h"
|
||||
}
|
||||
|
||||
TEST_GROUP(test_RegEdit)
|
||||
{
|
||||
void setup()
|
||||
{
|
||||
|
||||
}
|
||||
void teardown()
|
||||
{
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
TEST(test_RegEdit, FirstTest)
|
||||
{
|
||||
//FAIL("Fail me!");
|
||||
CHECK(true);
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
|
||||
# TEST_RUNNER
|
||||
add_library(simple_test
|
||||
simple_test.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(simple_test
|
||||
${CPPUTEST_LIBRARIES}/libCppUTest.a
|
||||
${CPPUTEST_LIBRARIES}/libCppUTestExt.a
|
||||
)
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
#include "CppUTest/TestHarness.h"
|
||||
|
||||
/*
|
||||
extern C
|
||||
{
|
||||
#include "simple.h"
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
TEST_GROUP(simple_test)
|
||||
{
|
||||
void setup()
|
||||
{
|
||||
|
||||
}
|
||||
void teardown()
|
||||
{
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
TEST(simple_test, passing_test)
|
||||
{
|
||||
CHECK_TRUE(1);
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
# TEST_RUNNER
|
||||
add_library(test_timer
|
||||
test_timer.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(test_timer
|
||||
${CPPUTEST_LIBRARIES}/libCppUTest.a
|
||||
${CPPUTEST_LIBRARIES}/libCppUTestExt.a
|
||||
timer
|
||||
)
|
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* Author: username
|
||||
* Date: todays_date
|
||||
* filename: test_timer.c
|
||||
* description: module_purpose
|
||||
*/
|
||||
|
||||
#include "CppUTest/CommandLineTestRunner.h"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
#include "MockRegEdit.h"
|
||||
#include "timer.h"
|
||||
}
|
||||
|
||||
TEST_GROUP(test_timer)
|
||||
{
|
||||
void setup()
|
||||
{
|
||||
|
||||
}
|
||||
void teardown()
|
||||
{
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
TEST(test_timer, SetupTimerMocks)
|
||||
{
|
||||
CHECK(true);
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
# TEST_RUNNER
|
||||
add_library(test_usart
|
||||
test_usart.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(test_usart
|
||||
${CPPUTEST_LIBRARIES}/libCppUTest.a
|
||||
${CPPUTEST_LIBRARIES}/libCppUTestExt.a
|
||||
usart
|
||||
)
|
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
* Author: username
|
||||
* Date: todays_date
|
||||
* filename: test_usart.c
|
||||
* description: module_purpose
|
||||
*/
|
||||
|
||||
#include "CppUTest/CommandLineTestRunner.h"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
#include "usart.h"
|
||||
}
|
||||
|
||||
TEST_GROUP(test_usart)
|
||||
{
|
||||
void setup()
|
||||
{
|
||||
|
||||
}
|
||||
void teardown()
|
||||
{
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
TEST(test_usart, FirstTest)
|
||||
{
|
||||
FAIL("Fail me!");
|
||||
}
|
||||
|
||||
TEST(test_usart, SecondTest)
|
||||
{
|
||||
STRCMP_EQUAL("hello", "world");
|
||||
LONGS_EQUAL(1, 2);
|
||||
CHECK(false);
|
||||
}
|
||||
|
Loading…
Reference in New Issue