Skip to content

Commit cd72cdf

Browse files
authored
Merge pull request #21 from Ghost64847/fix/p4-c5-firmware-link-guard
chore(build): update sdkconfig to 5.5.3 and guard c5 firmware embedde…
2 parents 471391b + 77ab629 commit cd72cdf

12 files changed

Lines changed: 527 additions & 39 deletions

File tree

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Bug Report
2-
description: Report a bug to help us improve HighBoy Firmware.
2+
description: Report a bug to help us improve High Boy Firmware.
33
labels: ["bug"]
44
body:
55
- type: markdown

.github/ISSUE_TEMPLATE/feature_request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Feature Request
2-
description: Suggest a new feature or improvement for HighBoy.
2+
description: Suggest a new feature or improvement for High Boy.
33
labels: ["enhancement"]
44
body:
55
- type: textarea

CHANGELOG.md

Lines changed: 430 additions & 0 deletions
Large diffs are not rendered by default.

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Contributing to HighBoy Firmware
1+
# Contributing to High Boy Firmware
22

3-
Thank you for your interest in contributing to HighBoy! We welcome contributions from everyone. This document provides guidelines and instructions to help you get started.
3+
Thank you for your interest in contributing to High Boy! We welcome contributions from everyone. This document provides guidelines and instructions to help you get started.
44

55

66
## Getting Started

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
</p>
44

55

6-
# HighBoy Firmware (Beta)
6+
# High Boy Firmware (Beta)
77

88
[![License](https://img.shields.io/github/license/HighCodeh/TentacleOS)](LICENSE)
99
[![GitHub Stars](https://img.shields.io/github/stars/HighCodeh/TentacleOS)](https://github.com/HighCodeh/TentacleOS/stargazers)
@@ -12,7 +12,7 @@
1212

1313
> **Languages**: [🇺🇸 English](README.md) | [🇧🇷 Português](README.pt.md)
1414
15-
This repository contains a **firmware in development** for the **HighBoy** platform.
15+
This repository contains a **firmware in development** for the **High Boy** platform.
1616
**Warning:** this firmware is in its **beta phase** and is **still incomplete**.
1717

1818
---

README.pt.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
</p>
44

55

6-
# Firmware HighBoy (Beta)
6+
# Firmware High Boy (Beta)
77

88
[![License](https://img.shields.io/github/license/HighCodeh/TentacleOS)](LICENSE)
99
[![GitHub Stars](https://img.shields.io/github/stars/HighCodeh/TentacleOS)](https://github.com/HighCodeh/TentacleOS/stargazers)
@@ -12,7 +12,7 @@
1212

1313
> **Idiomas**: [🇺🇸 English](README.md) | [🇧🇷 Português](README.pt.md)
1414
15-
Este repositório contém um **firmware em desenvolvimento** para a plataforma **HighBoy**.
15+
Este repositório contém um **firmware em desenvolvimento** para a plataforma **High Boy**.
1616
**Atenção:** este firmware está em **fase beta** e **ainda está incompleto**.
1717

1818
---
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"system_hardware": "HighBoy",
3-
"version": "0.1.0",
3+
"version": "1.1.0",
44
"ota_repository_url": "https://repo.highboy.com.br/firmware/system/update.json",
55
"changelog": ""
66
}

firmware_p4/assets/config/OTA/firmware.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"system_hardware": "HighBoy",
3-
"version": "0.1.0",
3+
"version": "1.1.0",
44
"ota_repository_url": "https://repo.highboy.com.br/firmware/system/update.json",
55
"changelog": ""
66
}

firmware_p4/components/Service/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,13 @@ idf_component_register(SRCS
100100

101101
# Embed C5 Firmware Binary into Service component (used by c5_flasher)
102102
set(C5_BIN_PATH "${CMAKE_SOURCE_DIR}/../firmware_c5/build/TentacleOS_C5.bin")
103+
set(C5_FIRMWARE_EMBEDDED 0)
103104
if(EXISTS ${C5_BIN_PATH})
104105
target_add_binary_data(${COMPONENT_LIB} "${C5_BIN_PATH}" BINARY)
106+
set(C5_FIRMWARE_EMBEDDED 1)
105107
message(STATUS "Embedding C5 Firmware: ${C5_BIN_PATH}")
106108
else()
107109
message(WARNING "C5 Firmware binary not found at ${C5_BIN_PATH}. Firmware update feature will be disabled.")
108110
endif()
111+
112+
target_compile_definitions(${COMPONENT_LIB} PRIVATE C5_FIRMWARE_EMBEDDED=${C5_FIRMWARE_EMBEDDED})

firmware_p4/components/Service/c5_flasher/c5_flasher.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@ static const char *TAG = "C5_FLASHER";
1212
#define FLASH_BLOCK_SIZE 1024
1313

1414
// Access to embedded binary symbols
15+
#if C5_FIRMWARE_EMBEDDED
1516
extern const uint8_t c5_firmware_bin_start[] asm("_binary_TentacleOS_C5_bin_start");
1617
extern const uint8_t c5_firmware_bin_end[] asm("_binary_TentacleOS_C5_bin_end");
18+
#endif
1719

1820
// ESP Serial Protocol Constants
1921
#define ESP_ROM_BAUD 115200
@@ -104,8 +106,13 @@ void c5_flasher_reset_normal(void) {
104106

105107
esp_err_t c5_flasher_update(const uint8_t *bin_data, uint32_t bin_size) {
106108
if (!bin_data) {
109+
#if C5_FIRMWARE_EMBEDDED
107110
bin_data = c5_firmware_bin_start;
108111
bin_size = c5_firmware_bin_end - c5_firmware_bin_start;
112+
#else
113+
ESP_LOGE(TAG, "Embedded C5 firmware is unavailable");
114+
return ESP_ERR_NOT_FOUND;
115+
#endif
109116
}
110117

111118
if (bin_size == 0) {

0 commit comments

Comments
 (0)