Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
222a821
LOGGING CODE BROKEN! Modified code to new REM naming; uncommented Bas…
emielsteerneman Sep 21, 2022
fda61d3
Started working on the queues for packets
emielsteerneman Sep 22, 2022
369fddd
Slowly transitioning, but first want to update the CircularBuffer class
emielsteerneman Sep 24, 2022
ecffae1
ITS NOT WORKING
emielsteerneman Sep 29, 2022
785aad6
WIP; Updated SerialSimulator
emielsteerneman Oct 6, 2022
8a5209c
more progress
emielsteerneman Oct 10, 2022
c1d9d3c
Weird laptop echt.. wtf
emielsteerneman Oct 20, 2022
b744fab
Stuff is starting to work! Don't use 'cat'!
emielsteerneman Oct 20, 2022
8b9bf13
Fixed a bug in SerialSimulator
emielsteerneman Oct 20, 2022
655796a
Good progress; Tons of stuff
emielsteerneman Oct 23, 2022
8dac11d
updated listener.py
emielsteerneman Oct 23, 2022
1bb7c2f
WORKS! Needs cleanup though
emielsteerneman Oct 24, 2022
d65fe31
Updated gitignore to contain hidden virtual environment folder as well
Oct 26, 2022
79d5084
Fixed bug in listener.py; Added git-print stuff to basestation
emielsteerneman Oct 27, 2022
a0d1032
Added timestamp stuff
emielsteerneman Oct 27, 2022
2978dfa
better stuff
emielsteerneman Oct 27, 2022
7546c1b
Even more logging and plotting and stuff
emielsteerneman Oct 27, 2022
9cb2d58
Removed space from csv delimiter; More statistics when parsing file
emielsteerneman Nov 8, 2022
cb3138d
Added REMParser and automatic logging to joystick
emielsteerneman Nov 8, 2022
7593e98
Added joystick right trigger for kicking, left trigger for dribbling
emielsteerneman Nov 11, 2022
3644a70
Added playback functionality for .rembin files
emielsteerneman Nov 11, 2022
c5deb32
start of custom class implementation, misses most functional parts, b…
casdoorn Nov 23, 2022
c396ee8
implemented all transmit/receive functions
casdoorn Nov 24, 2022
8691067
implemented all remaining functions for the usb class, only config re…
casdoorn Nov 25, 2022
3170dd9
Working on responding to GET_CONFIGURATION; Joystick now printing Bas…
Nov 28, 2022
f56feb8
implemented config files and added abstarction for the interfaces
casdoorn Nov 29, 2022
39c6d8e
added basestation callback functions
casdoorn Nov 30, 2022
889358c
Progress; Basestation now correctly responds to GET_CONFIGURATION
emielsteerneman Nov 30, 2022
1dfdde9
Basestation should now respond correctly to BasestationConfiguration …
emielsteerneman Nov 30, 2022
d3f2177
Fixed bug : toRobotId bool -> uint8; Reenabled SXs
Nov 30, 2022
f74e721
usb works, but still issues with a stm transfer limit. So only so man…
casdoorn Nov 30, 2022
0d87cd5
Reenabled Wireless_getChannel
Nov 30, 2022
39d4d5d
reverted default channel back to yellow
Nov 30, 2022
14b0c99
Merge branch 'development' into feature/general_packet_structure
emielsteerneman Nov 30, 2022
ecd5a00
Merge pull request #27 from RoboTeamTwente/feature/general_packet_str…
supertom01 Dec 1, 2022
7436794
include missing files wrongly ignored by .gitignore
casdoorn Dec 1, 2022
1666a05
removed test modifications
casdoorn Dec 1, 2022
dd10353
merge development into custom_usb_class. It compiles, but need to che…
casdoorn Dec 5, 2022
1732a25
actually merge
casdoorn Dec 5, 2022
cb9d422
working USB, currently just echoes data back
casdoorn Feb 22, 2023
e4208ae
Reenabled DMA for both SX1280's; Both Peripheral-to-Memory and Memory…
emielsteerneman Apr 20, 2023
345974e
Updated huart3 to huart4; Placed IWDG_Init to correct place;
emielsteerneman Apr 20, 2023
43fbadf
Added function to send fake robot cmd; Added more heartbeat timers; A…
emielsteerneman Apr 20, 2023
5af3304
Forgot to add this file to enable DMAs for SPIs;|
emielsteerneman Apr 20, 2023
c1c1e32
Added even MORE files that I forgot to enable SX DMA;
emielsteerneman Apr 20, 2023
9aa4509
removed unncessesary file
emielsteerneman Apr 20, 2023
a29bbc2
Updated .gitignore with *.ld
emielsteerneman Apr 20, 2023
aee7b12
Updated REM to v2
emielsteerneman Apr 20, 2023
e10bd3e
removed unnecessary file
emielsteerneman Apr 28, 2023
73fe5e4
Updated REM to current (v3);
emielsteerneman Apr 28, 2023
4b123ea
Remove echoing of packets on the high priority interface
supertom01 May 19, 2023
17db818
Created a wrapper for a basestation connection, still have to test it…
supertom01 May 19, 2023
41a16cd
Fix the FIFO buffers for the two interfaces of the USB, CubeMX only g…
supertom01 May 25, 2023
c2f70d1
Update the configuration of USBD to also allow for two interfaces
supertom01 May 25, 2023
6688701
Toggle LED1 when receiving a low priority usb packet
supertom01 May 25, 2023
b0bafce
Rewrite the connection with the basestation, allowing support for the…
supertom01 May 26, 2023
97c0723
Fix feedback sending
JornJorn Mar 14, 2024
dfb15ba
disabling D-cache
JWillegers Mar 14, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,15 @@
__pycache__
.idea/
venv
.venv
Drivers
Middlewares
!Core/Inc/Middlewares/**
!Core/Src/Middlewares/**
USB_DEVICE
startup
STM32F767ZITx_FLASH.ld
*.ld
compile_commands.json
python_utils/rem

python_utils/*.csv
Expand Down
27 changes: 26 additions & 1 deletion CompilerFlags.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,31 @@
# This file sets additional flags that cannot be set from platformio.ini itself
# these can be for the compiler or for the linker
import configparser
import subprocess
import re

# load build environment
print("\n==================== CompilerFlags.py ====================")
l = lambda *args, **kwargs : print("[CompilerFlags.py]", *args, **kwargs)

Import("env")

# read settings from platform.ini to also include
conf = configparser.ConfigParser()
conf.read("platformio.ini")
opt = conf.get("env:nucleo_f767zi", "optimization")

git_branch_name = subprocess.check_output(['git', 'rev-parse', '--abbrev-ref', 'HEAD']).decode('ascii').strip()
git_commit_date = subprocess.check_output(['git', 'show', '-s', '--date=format:%d/%m/%Y', '--format=%cd', 'HEAD']).decode('ascii').strip()
git_commit_hash = subprocess.check_output(['git', 'show', '-s', '--format=%h', 'HEAD']).decode('ascii').strip()
git_commit_msg = subprocess.check_output(['git', 'show', '-s', '--format=%s', 'HEAD']).decode('ascii').strip()

git_string = f"{git_branch_name} {git_commit_hash} | {git_commit_date} | {git_commit_msg}"
git_string = re.sub('-', '_', git_string)
git_string = re.sub(r'[^a-zA-Z0-9 /_]', '', git_string)
l(git_string)


# read settings from platform.ini to also include
conf = configparser.ConfigParser()
conf.read("platformio.ini")
Expand All @@ -13,6 +34,8 @@
# compiler settings
env.Append(
CCFLAGS=[
f"-D__GIT_STRING__={git_string}",
f"-D__GIT_DEVELOPMENT__=\"{[0, 1][git_branch_name == 'development']}\"",
opt,
# "-std=c++11",
"-g3",
Expand Down Expand Up @@ -47,4 +70,6 @@
"-mfpu=fpv5-sp-d16",
"-Wl,-u,_printf_float,-u,_scanf_float"
]
)
)

print("\n")
47 changes: 47 additions & 0 deletions Core/Inc/FATFS/App/fatfs.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file fatfs.h
* @brief Header for fatfs applications
******************************************************************************
* @attention
*
* Copyright (c) 2022 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __fatfs_H
#define __fatfs_H
#ifdef __cplusplus
extern "C" {
#endif

#include "ff.h"
#include "ff_gen_drv.h"
#include "sd_diskio.h" /* defines SD_Driver as external */

/* USER CODE BEGIN Includes */

/* USER CODE END Includes */

extern uint8_t retSD; /* Return value for SD */
extern char SDPath[4]; /* SD logical drive path */
extern FATFS SDFatFS; /* File system object for SD logical drive */
extern FIL SDFile; /* File object for SD */

void MX_FATFS_Init(void);

/* USER CODE BEGIN Prototypes */

/* USER CODE END Prototypes */
#ifdef __cplusplus
}
#endif
#endif /*__fatfs_H */
89 changes: 89 additions & 0 deletions Core/Inc/FATFS/Target/bsp_driver_sd.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file bsp_driver_sd.h (based on stm32756g_eval_sd.h)
* @brief This file contains the common defines and functions prototypes for
* the bsp_driver_sd.c driver.
******************************************************************************
* @attention
*
* Copyright (c) 2022 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */

/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __STM32F7_SD_H
#define __STM32F7_SD_H

#ifdef __cplusplus
extern "C" {
#endif

/* Includes ------------------------------------------------------------------*/
#include "stm32f7xx_hal.h"
#include "fatfs_platform.h"

/* Exported types --------------------------------------------------------*/
/**
* @brief SD Card information structure
*/
#define BSP_SD_CardInfo HAL_SD_CardInfoTypeDef

/* Exported constants --------------------------------------------------------*/
/**
* @brief SD status structure definition
*/
#define MSD_OK ((uint8_t)0x00)
#define MSD_ERROR ((uint8_t)0x01)
#define MSD_ERROR_SD_NOT_PRESENT ((uint8_t)0x02)

/**
* @brief SD transfer state definition
*/
#define SD_TRANSFER_OK ((uint8_t)0x00)
#define SD_TRANSFER_BUSY ((uint8_t)0x01)

#define SD_PRESENT ((uint8_t)0x01)
#define SD_NOT_PRESENT ((uint8_t)0x00)
#define SD_DATATIMEOUT ((uint32_t)100000000)

#ifdef OLD_API
/* kept to avoid issue when migrating old projects. */
/* USER CODE BEGIN 0 */

/* USER CODE END 0 */
#else
/* USER CODE BEGIN BSP_H_CODE */

/* Exported functions --------------------------------------------------------*/
uint8_t BSP_SD_Init(void);
uint8_t BSP_SD_ITConfig(void);
uint8_t BSP_SD_ReadBlocks(uint32_t *pData, uint32_t ReadAddr, uint32_t NumOfBlocks, uint32_t Timeout);
uint8_t BSP_SD_WriteBlocks(uint32_t *pData, uint32_t WriteAddr, uint32_t NumOfBlocks, uint32_t Timeout);
uint8_t BSP_SD_ReadBlocks_DMA(uint32_t *pData, uint32_t ReadAddr, uint32_t NumOfBlocks);
uint8_t BSP_SD_WriteBlocks_DMA(uint32_t *pData, uint32_t WriteAddr, uint32_t NumOfBlocks);
uint8_t BSP_SD_Erase(uint32_t StartAddr, uint32_t EndAddr);
uint8_t BSP_SD_GetCardState(void);
void BSP_SD_GetCardInfo(BSP_SD_CardInfo *CardInfo);
uint8_t BSP_SD_IsDetected(void);

/* These functions can be modified in case the current settings (e.g. DMA stream)
need to be changed for specific application needs */
void BSP_SD_AbortCallback(void);
void BSP_SD_WriteCpltCallback(void);
void BSP_SD_ReadCpltCallback(void);
/* USER CODE END BSP_H_CODE */
#endif

#ifdef __cplusplus
}
#endif

#endif /* __STM32F7_SD_H */
27 changes: 27 additions & 0 deletions Core/Inc/FATFS/Target/fatfs_platform.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : fatfs_platform.h
* @brief : fatfs_platform header file
******************************************************************************
* @attention
*
* Copyright (c) 2022 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/
#include "stm32f7xx_hal.h"
/* Defines ------------------------------------------------------------------*/
#define SD_PRESENT ((uint8_t)0x01) /* also in bsp_driver_sd.h */
#define SD_NOT_PRESENT ((uint8_t)0x00) /* also in bsp_driver_sd.h */
#define SD_DETECT_PIN GPIO_PIN_0
#define SD_DETECT_GPIO_PORT GPIOE
/* Prototypes ---------------------------------------------------------------*/
uint8_t BSP_PlatformIsDetected(void);
Loading