Skip to content

Commit

Permalink
Merge branch 'master' of github.com:rene-dev/stmbl
Browse files Browse the repository at this point in the history
  • Loading branch information
crinq committed Apr 12, 2018
2 parents db711ec + 69f262c commit a89172d
Show file tree
Hide file tree
Showing 13 changed files with 29 additions and 18 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,4 @@ src/conf_templates.c
stm32f303/inc/commandslist.h
stm32f303/inc/hal_tbl.h
stm32f303/src/hal_tbl.c
toolchain-user.mak
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,6 @@ clean:
# Include the base rules
#
include base.mak
include toolchain.mak

# Include the dependency files
#
Expand Down
3 changes: 3 additions & 0 deletions base.mak
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,6 @@ flash: $(TARGET).bin
%.dfu: %.bin
@cp $< $@
@$(DFU-SUFFIX) -v 0483 -p df11 -a $@

include toolchain.mak
-include toolchain-user.mak
1 change: 0 additions & 1 deletion bootloader/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ clean:
# Include the base rules
#
include base.mak
include toolchain.mak

# Include the dependency files
#
Expand Down
7 changes: 4 additions & 3 deletions bootloader/src/version.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#include "version.h"
#include "version_number.h"

volatile const version_info_t version_info __attribute__((section(".version_info"))) = {
.product_name = "STMBL-Bootloader",
.major = 0,
.minor = 9,
.patch = 15};
.major = VERSION_MAJOR,
.minor = VERSION_MINOR,
.patch = VERSION_PATCH};
1 change: 0 additions & 1 deletion f3_boot/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@ clean:
# Include the base rules
#
include base.mak
include toolchain.mak

# Include the dependency files
#
Expand Down
7 changes: 4 additions & 3 deletions f3_boot/src/version.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#include "version.h"
#include "version_number.h"

volatile const version_info_t version_info __attribute__((section(".version_info"))) = {
.product_name = "STMBL-f3-boot",
.major = 0,
.minor = 9,
.patch = 15};
.major = VERSION_MAJOR,
.minor = VERSION_MINOR,
.patch = VERSION_PATCH};
5 changes: 3 additions & 2 deletions shared/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ typedef struct {
} state : 8;
uint16_t padding;
} packet_bootloader_t;

_Static_assert(sizeof(packet_bootloader_t) == 24, "packet_bootloader_t size error");

//process data from f3 to f4
typedef struct {
Expand All @@ -57,6 +57,7 @@ typedef struct {
uint8_t buf;
uint16_t padding;
} packet_from_hv_t;
_Static_assert(sizeof(packet_from_hv_t) == 24, "packet_from_hv_t size error");

//process data from f4 to f3
typedef struct {
Expand Down Expand Up @@ -85,6 +86,7 @@ typedef struct {
uint32_t padding;
};
} packet_to_hv_t;
_Static_assert(sizeof(packet_to_hv_t) == 32, "packet_to_hv_t size error");

//config data for f3
typedef union {
Expand Down Expand Up @@ -153,7 +155,6 @@ typedef enum {
HV_OVERCURRENT_HW,
} fault_t;


//check if structs can be send at 5kHz with DATABAUD
_Static_assert(sizeof(packet_to_hv_t) <= DATABAUD / 11 / 5000 - 1 - 5, "to_hv struct to large");
_Static_assert(sizeof(packet_from_hv_t) <= DATABAUD / 11 / 5000 - 1 - 5, "from_hv struct to large");
Expand Down
5 changes: 5 additions & 0 deletions shared/version_number.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#pragma once

#define VERSION_MAJOR 0
#define VERSION_MINOR 9
#define VERSION_PATCH 17
7 changes: 4 additions & 3 deletions src/version.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#include "version.h"
#include "version_number.h"

volatile const version_info_t version_info __attribute__((section(".version_info"))) = {
.product_name = "STMBL",
.major = 0,
.minor = 9,
.patch = 15};
.major = VERSION_MAJOR,
.minor = VERSION_MINOR,
.patch = VERSION_PATCH};
1 change: 0 additions & 1 deletion stm32f303/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,6 @@ clean:
# Include the base rules
#
include base.mak
include toolchain.mak

# Include the dependency files
#
Expand Down
7 changes: 4 additions & 3 deletions stm32f303/src/version.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#include "version.h"
#include "version_number.h"

volatile const version_info_t version_info __attribute__((section(".version_info"))) = {
.product_name = "STMBL-hv-f303",
.major = 0,
.minor = 9,
.patch = 15};
.major = VERSION_MAJOR,
.minor = VERSION_MINOR,
.patch = VERSION_PATCH};
1 change: 1 addition & 0 deletions toolchain.mak
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Define programs and commands for the toolchain
# Do not modiy this file. Instead create a file toolchain-user.mak which can overwrite anything in here.
PYTHON = python
DFU-UTIL = dfu-util
DFU-SUFFIX = dfu-suffix
Expand Down

0 comments on commit a89172d

Please sign in to comment.