Skip to content

Commit 200f103

Browse files
authored
Add new app "hopper" app. (#2482)
* make both jammer and hopper exist * add example hopper payload * example files * swap scanner and recon app location
1 parent 9b352f4 commit 200f103

File tree

12 files changed

+722
-21
lines changed

12 files changed

+722
-21
lines changed

firmware/application/external/external.cmake

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -151,17 +151,21 @@ set(EXTCPPSRC
151151
external/app_manager/main.cpp
152152
external/app_manager/ui_app_manager.cpp
153153

154-
# whip calculator
155-
external/antenna_length/main.cpp
156-
external/antenna_length/ui_whipcalc.cpp
157-
158-
# wav viewer
159-
external/wav_view/main.cpp
160-
external/wav_view/ui_view_wav.cpp
161-
162-
# wipe sdcard
163-
external/sd_wipe/main.cpp
164-
external/sd_wipe/ui_sd_wipe.cpp
154+
#hopper
155+
external/hopper/main.cpp
156+
external/hopper/ui_hopper.cpp
157+
158+
# whip calculator
159+
external/antenna_length/main.cpp
160+
external/antenna_length/ui_whipcalc.cpp
161+
162+
# wav viewer
163+
external/wav_view/main.cpp
164+
external/wav_view/ui_view_wav.cpp
165+
166+
# wipe sdcard
167+
external/sd_wipe/main.cpp
168+
external/sd_wipe/ui_sd_wipe.cpp
165169
)
166170

167171
set(EXTAPPLIST
@@ -201,7 +205,8 @@ set(EXTAPPLIST
201205
tuner
202206
metronome
203207
app_manager
204-
antenna_length
205-
view_wav
206-
sd_wipe
207-
)
208+
hopper
209+
antenna_length
210+
view_wav
211+
sd_wipe
212+
)

firmware/application/external/external.ld

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,10 @@ MEMORY
5959
ram_external_app_tuner(rwx) : org = 0xADD20000, len = 32k
6060
ram_external_app_metronome(rwx) : org = 0xADD30000, len = 32k
6161
ram_external_app_app_manager(rwx) : org = 0xADD40000, len = 32k
62-
ram_external_app_antenna_length(rwx) : org = 0xADD50000, len = 32k
63-
ram_external_app_view_wav(rwx) : org = 0xADD60000, len = 32k
64-
ram_external_app_sd_wipe(rwx) : org = 0xADD70000, len = 32k
62+
ram_external_app_hopper(rwx) : org = 0xADD50000, len = 32k
63+
ram_external_app_antenna_length(rwx) : org = 0xADD60000, len = 32k
64+
ram_external_app_view_wav(rwx) : org = 0xADD70000, len = 32k
65+
ram_external_app_sd_wipe(rwx) : org = 0xADD80000, len = 32k
6566
}
6667

6768
SECTIONS
@@ -283,6 +284,12 @@ SECTIONS
283284
*(*ui*external_app*app_manager*);
284285
} > ram_external_app_app_manager
285286

287+
.external_app_hopper : ALIGN(4) SUBALIGN(4)
288+
{
289+
KEEP(*(.external_app.app_hopper.application_information));
290+
*(*ui*external_app*hopper*);
291+
} > ram_external_app_hopper
292+
286293
.external_app_antenna_length : ALIGN(4) SUBALIGN(4)
287294
{
288295
KEEP(*(.external_app.app_antenna_length.application_information));
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
/*
2+
* Copyright (C) 2023 Bernd Herzog
3+
*
4+
* This file is part of PortaPack.
5+
*
6+
* This program is free software; you can redistribute it and/or modify
7+
* it under the terms of the GNU General Public License as published by
8+
* the Free Software Foundation; either version 2, or (at your option)
9+
* any later version.
10+
*
11+
* This program is distributed in the hope that it will be useful,
12+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
* GNU General Public License for more details.
15+
*
16+
* You should have received a copy of the GNU General Public License
17+
* along with this program; see the file COPYING. If not, write to
18+
* the Free Software Foundation, Inc., 51 Franklin Street,
19+
* Boston, MA 02110-1301, USA.
20+
*/
21+
22+
#include "ui.hpp"
23+
#include "ui_hopper.hpp"
24+
#include "ui_navigation.hpp"
25+
#include "external_app.hpp"
26+
27+
namespace ui::external_app::hopper {
28+
void initialize_app(ui::NavigationView& nav) {
29+
nav.push<HopperView>();
30+
}
31+
} // namespace ui::external_app::hopper
32+
33+
extern "C" {
34+
35+
__attribute__((section(".external_app.app_hopper.application_information"), used)) application_information_t _application_information_hopper = {
36+
/*.memory_location = */ (uint8_t*)0x00000000,
37+
/*.externalAppEntry = */ ui::external_app::hopper::initialize_app,
38+
/*.header_version = */ CURRENT_HEADER_VERSION,
39+
/*.app_version = */ VERSION_MD5,
40+
41+
/*.app_name = */ "Hopper",
42+
/*.bitmap_data = */ {
43+
0xE0,
44+
0x07,
45+
0xF8,
46+
0x1F,
47+
0x1C,
48+
0x38,
49+
0x0E,
50+
0x78,
51+
0x06,
52+
0x7C,
53+
0x03,
54+
0xCE,
55+
0x03,
56+
0xC7,
57+
0x83,
58+
0xC3,
59+
0xC3,
60+
0xC1,
61+
0xE3,
62+
0xC0,
63+
0x73,
64+
0xC0,
65+
0x3E,
66+
0x60,
67+
0x1E,
68+
0x70,
69+
0x1C,
70+
0x38,
71+
0xF8,
72+
0x1F,
73+
0xE0,
74+
0x07,
75+
},
76+
/*.icon_color = */ ui::Color::green().v,
77+
/*.menu_location = */ app_location_t::TX,
78+
/*.desired_menu_position = */ -1,
79+
80+
/*.m4_app_tag = portapack::spi_flash::image_tag_jammer */ {'P', 'J', 'A', 'M'},
81+
/*.m4_app_offset = */ 0x00000000, // will be filled at compile time
82+
};
83+
}

0 commit comments

Comments
 (0)