Skip to content

Commit 70e534a

Browse files
v4.0-beta.0
1 parent 49279c8 commit 70e534a

File tree

7 files changed

+141
-7
lines changed

7 files changed

+141
-7
lines changed

CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
# CMakeLists in this exact order for cmake to work correctly
33
cmake_minimum_required(VERSION 3.5)
44

5-
set(ENV{BLUEPAD32_ARDUINO} TRUE)
6-
75
set(RMAKER_PATH ${CMAKE_SOURCE_DIR}/components/esp-rainmaker)
86
set(EXTRA_COMPONENT_DIRS ${RMAKER_PATH}/components/esp-insights/components ${RMAKER_PATH}/components)
97

bluepad32_files/package_esp32_bluepad32_index.json

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,90 @@
99
"online": "https://discord.gg/r5aMn6Cw5q"
1010
},
1111
"platforms": [
12+
{
13+
"name": "esp32_bluepad32",
14+
"architecture": "esp32",
15+
"version": "4.0-beta.0",
16+
"category": "Contributed",
17+
"url": "https://github.com/ricardoquesada/esp32-arduino-lib-builder/releases/download/4.0-beta.0/esp32-bluepad32-4.0-beta.0.zip",
18+
"archiveFileName": "esp32-bluepad32-4.0-beta.0.zip",
19+
"checksum": "SHA-256:3310b79c23f5dee3578896cd55aec170c6098db2bae5c0a9d96f8a64ac8a18cf",
20+
"size": "197519090",
21+
"help": {
22+
"online": "https://discord.gg/r5aMn6Cw5q"
23+
},
24+
"boards": [
25+
{
26+
"name": "ESP32 Dev Board"
27+
},
28+
{
29+
"name": "ESP32-S3 Dev Board"
30+
},
31+
{
32+
"name": "ESP32-C3 Dev Board"
33+
},
34+
{
35+
"name": "Arduino Nano ESP32"
36+
}
37+
],
38+
"toolsDependencies": [
39+
{
40+
"packager": "esp32",
41+
"name": "xtensa-esp32-elf-gcc",
42+
"version": "esp-2021r2-patch5-8.4.0"
43+
},
44+
{
45+
"packager": "esp32",
46+
"name": "xtensa-esp32s2-elf-gcc",
47+
"version": "esp-2021r2-patch5-8.4.0"
48+
},
49+
{
50+
"packager": "esp32",
51+
"name": "xtensa-esp32s3-elf-gcc",
52+
"version": "esp-2021r2-patch5-8.4.0"
53+
},
54+
{
55+
"packager": "esp32",
56+
"name": "xtensa-esp-elf-gdb",
57+
"version": "11.2_20220823"
58+
},
59+
{
60+
"packager": "esp32",
61+
"name": "riscv32-esp-elf-gcc",
62+
"version": "esp-2021r2-patch5-8.4.0"
63+
},
64+
{
65+
"packager": "esp32",
66+
"name": "riscv32-esp-elf-gdb",
67+
"version": "11.2_20220823"
68+
},
69+
{
70+
"packager": "esp32",
71+
"name": "openocd-esp32",
72+
"version": "v0.12.0-esp32-20230419"
73+
},
74+
{
75+
"packager": "esp32",
76+
"name": "esptool_py",
77+
"version": "4.5.1"
78+
},
79+
{
80+
"packager": "esp32",
81+
"name": "mkspiffs",
82+
"version": "0.2.3"
83+
},
84+
{
85+
"packager": "esp32",
86+
"name": "mklittlefs",
87+
"version": "3.0.0-gnu12-dc7f933"
88+
},
89+
{
90+
"packager": "arduino",
91+
"name": "dfu-util",
92+
"version": "0.11.0-arduino5"
93+
}
94+
]
95+
},
1296
{
1397
"name": "esp32_bluepad32",
1498
"architecture": "esp32",

bluepad32_files/platform.txt

Lines changed: 3 additions & 3 deletions
Large diffs are not rendered by default.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
include(CMakePrintHelpers)
2+
3+
set(srcs
4+
"main.c"
5+
)
6+
7+
set(requires
8+
arduino
9+
bluepad32
10+
bluepad32_arduino
11+
btstack)
12+
13+
14+
idf_component_register(SRCS "${srcs}"
15+
REQUIRES ${requires})
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
// SPDX-License-Identifier: Apache-2.0
2+
// Copyright 2019 Ricardo Quesada
3+
// http://retro.moe/unijoysticle2
4+
5+
#include "sdkconfig.h"
6+
7+
#include <stddef.h>
8+
9+
// BTstack related
10+
#include <btstack_port_esp32.h>
11+
#include <btstack_run_loop.h>
12+
13+
// Bluepad32 related
14+
#include <arduino_platform.h>
15+
#include <uni.h>
16+
17+
//
18+
// Autostart
19+
//
20+
int app_main(void) {
21+
// hci_dump_open(NULL, HCI_DUMP_STDOUT);
22+
23+
// Configure BTstack for ESP32 VHCI Controller
24+
btstack_init();
25+
26+
// hci_dump_init(hci_dump_embedded_stdout_get_instance());
27+
28+
// Must be called before uni_init()
29+
uni_platform_set_custom(get_arduino_platform());
30+
31+
// Init Bluepad32.
32+
uni_init(0 /* argc */, NULL /* argv */);
33+
34+
// Does not return.
35+
btstack_run_loop_execute();
36+
return 0;
37+
}

configs/defconfig.common

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,6 @@ CONFIG_MBEDTLS_DYNAMIC_FREE_PEER_CERT=y
105105
CONFIG_MBEDTLS_DYNAMIC_FREE_CONFIG_DATA=y
106106

107107
# Bluepad32 begin
108-
CONFIG_BLUEPAD32_PLATFORM_ARDUINO=y
108+
CONFIG_BLUEPAD32_PLATFORM_CUSTOM=y
109109
CONFIG_BLUEPAD32_USB_CONSOLE_ENABLE=n
110110
# Bluepad32 end

tools/config.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ AR_GEN_PART_PY="$AR_TOOLS/gen_esp32part.py"
4747
AR_SDK="$AR_TOOLS/sdk/$IDF_TARGET"
4848

4949
function get_os(){
50-
OSBITS=`arch`
50+
OSBITS=`uname -m`
5151
if [[ "$OSTYPE" == "linux"* ]]; then
5252
if [[ "$OSBITS" == "i686" ]]; then
5353
echo "linux32"

0 commit comments

Comments
 (0)