This repository was archived by the owner on Aug 9, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 19 files changed +478
-173
lines changed Expand file tree Collapse file tree 19 files changed +478
-173
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ fn main() -> ! {
20
20
let mut timg0 = dp. TIMG0 ;
21
21
let mut timg1 = dp. TIMG1 ;
22
22
23
- let ( mut dport , dport_clock_control) = dp. DPORT . split ( ) ;
23
+ let ( _ , dport_clock_control) = dp. DPORT . split ( ) ;
24
24
25
25
// (https://github.com/espressif/openocd-esp32/blob/97ba3a6bb9eaa898d91df923bbedddfeaaaf28c9/src/target/esp32.c#L431)
26
26
// openocd disables the watchdog timer on halt
@@ -50,7 +50,6 @@ fn main() -> ! {
50
50
} ,
51
51
Config :: default ( ) ,
52
52
clkcntrl_config,
53
- & mut dport,
54
53
)
55
54
. unwrap ( ) ;
56
55
Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ fn main() -> ! {
100
100
// we will do it manually on startup
101
101
disable_timg_wdts ( & mut timg0, & mut timg1) ;
102
102
103
- let ( mut dport , dport_clock_control) = dp. DPORT . split ( ) ;
103
+ let ( _ , dport_clock_control) = dp. DPORT . split ( ) ;
104
104
105
105
// setup clocks & watchdog
106
106
let mut clock_control = ClockControl :: new (
@@ -132,7 +132,6 @@ fn main() -> ! {
132
132
} ,
133
133
Config :: default ( ) ,
134
134
clock_control_config,
135
- & mut dport,
136
135
)
137
136
. unwrap ( ) ;
138
137
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ static GPIO: CriticalSectionSpinLockMutex<
34
34
fn main ( ) -> ! {
35
35
let dp = target:: Peripherals :: take ( ) . unwrap ( ) ;
36
36
37
- let ( mut dport , dport_clock_control) = dp. DPORT . split ( ) ;
37
+ let ( _ , dport_clock_control) = dp. DPORT . split ( ) ;
38
38
39
39
let clkcntrl = esp32_hal:: clock_control:: ClockControl :: new (
40
40
dp. RTCCNTL ,
@@ -73,7 +73,6 @@ fn main() -> ! {
73
73
} ,
74
74
Config :: default ( ) . baudrate ( 115_200 . Hz ( ) ) ,
75
75
clkcntrl_config,
76
- & mut dport,
77
76
)
78
77
. unwrap ( ) ;
79
78
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ fn main() -> ! {
20
20
let mut timg0 = dp. TIMG0 ;
21
21
let mut timg1 = dp. TIMG1 ;
22
22
23
- let ( mut dport , dport_clock_control) = dp. DPORT . split ( ) ;
23
+ let ( _ , dport_clock_control) = dp. DPORT . split ( ) ;
24
24
25
25
// (https://github.com/espressif/openocd-esp32/blob/97ba3a6bb9eaa898d91df923bbedddfeaaaf28c9/src/target/esp32.c#L431)
26
26
// openocd disables the watchdog timer on halt
@@ -50,7 +50,6 @@ fn main() -> ! {
50
50
} ,
51
51
Config :: default ( ) ,
52
52
clkcntrl_config,
53
- & mut dport,
54
53
)
55
54
. unwrap ( ) ;
56
55
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ fn main() -> ! {
32
32
// we will do it manually on startup
33
33
disable_timg_wdts ( & mut timg0, & mut timg1) ;
34
34
35
- let ( mut dport , dport_clock_control) = dp. DPORT . split ( ) ;
35
+ let ( _ , dport_clock_control) = dp. DPORT . split ( ) ;
36
36
37
37
// setup clocks & watchdog
38
38
let mut clock_control = ClockControl :: new (
@@ -71,7 +71,6 @@ fn main() -> ! {
71
71
} ,
72
72
Config :: default ( ) ,
73
73
clock_control_config,
74
- & mut dport,
75
74
)
76
75
. unwrap ( ) ;
77
76
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ fn main() -> ! {
26
26
// we will do it manually on startup
27
27
disable_timg_wdts ( & mut timg0, & mut timg1) ;
28
28
29
- let ( mut dport , dport_clock_control) = dp. DPORT . split ( ) ;
29
+ let ( _ , dport_clock_control) = dp. DPORT . split ( ) ;
30
30
31
31
// setup clocks & watchdog
32
32
let clock_control = ClockControl :: new (
@@ -53,7 +53,6 @@ fn main() -> ! {
53
53
} ,
54
54
Config :: default ( ) ,
55
55
clock_control_config,
56
- & mut dport,
57
56
)
58
57
. unwrap ( ) ;
59
58
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ fn main() -> ! {
26
26
// we will do it manually on startup
27
27
disable_timg_wdts ( & mut timg0, & mut timg1) ;
28
28
29
- let ( mut dport , dport_clock_control) = dp. DPORT . split ( ) ;
29
+ let ( _ , dport_clock_control) = dp. DPORT . split ( ) ;
30
30
31
31
// setup clocks & watchdog
32
32
let mut clock_control = ClockControl :: new (
@@ -65,7 +65,6 @@ fn main() -> ! {
65
65
} ,
66
66
Config :: default ( ) ,
67
67
clock_control_config,
68
- & mut dport,
69
68
)
70
69
. unwrap ( ) ;
71
70
uart0. change_baudrate ( 115200 ) . unwrap ( ) ;
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ const BLINK_HZ: Hertz = Hertz(2);
19
19
fn main ( ) -> ! {
20
20
let dp = target:: Peripherals :: take ( ) . expect ( "Failed to obtain Peripherals" ) ;
21
21
22
- let ( mut dport , dport_clock_control) = dp. DPORT . split ( ) ;
22
+ let ( _ , dport_clock_control) = dp. DPORT . split ( ) ;
23
23
24
24
let clkcntrl = ClockControl :: new (
25
25
dp. RTCCNTL ,
@@ -56,7 +56,6 @@ fn main() -> ! {
56
56
..Config :: default ( )
57
57
} ,
58
58
clkcntrl_config,
59
- & mut dport,
60
59
)
61
60
. unwrap ( ) ;
62
61
Original file line number Diff line number Diff line change 88
88
fn main ( ) -> ! {
89
89
let dp = target:: Peripherals :: take ( ) . expect ( "Failed to obtain Peripherals" ) ;
90
90
91
- let ( mut dport , dport_clock_control) = dp. DPORT . split ( ) ;
91
+ let ( _ , dport_clock_control) = dp. DPORT . split ( ) ;
92
92
93
93
let clkcntrl = ClockControl :: new (
94
94
dp. RTCCNTL ,
@@ -123,7 +123,6 @@ fn main() -> ! {
123
123
..serial:: config:: Config :: default ( )
124
124
} ,
125
125
clkcntrl_config,
126
- & mut dport,
127
126
)
128
127
. unwrap ( ) ;
129
128
@@ -145,7 +144,6 @@ fn main() -> ! {
145
144
data_mode : spi:: config:: MODE_0 ,
146
145
} ,
147
146
clkcntrl_config,
148
- & mut dport,
149
147
)
150
148
. unwrap ( ) ;
151
149
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ static TX: CriticalSectionSpinLockMutex<Option<esp32_hal::serial::Tx<esp32::UART
41
41
fn main ( ) -> ! {
42
42
let dp = target:: Peripherals :: take ( ) . unwrap ( ) ;
43
43
44
- let ( mut dport , dport_clock_control) = dp. DPORT . split ( ) ;
44
+ let ( _ , dport_clock_control) = dp. DPORT . split ( ) ;
45
45
46
46
let clkcntrl = esp32_hal:: clock_control:: ClockControl :: new (
47
47
dp. RTCCNTL ,
@@ -93,7 +93,6 @@ fn main() -> ! {
93
93
} ,
94
94
config,
95
95
clkcntrl_config,
96
- & mut dport,
97
96
)
98
97
. unwrap ( ) ;
99
98
Original file line number Diff line number Diff line change 243
243
then
244
244
printf " \n\n"
245
245
# get gen_esp32part.py and create binary partition table
246
- curl -s -S -f --max-time 2 -L $GENPART_SOURCE --output target/gen_esp32part.py_new
246
+ curl -s -S -f --max-time 5 -L $GENPART_SOURCE --output target/gen_esp32part.py_new
247
247
248
248
if [ $? -ne 0 ]; then
249
249
if [ -f target/gen_esp32part.py ]; then
269
269
270
270
# get bootloader.bin file
271
271
# (different variants exist, but only difference is flash settings which are overriden by esptool)
272
- curl -s -S -f --max-time 2 -L $BOOTLOADER_SOURCE --output target/bootloader.bin_new
272
+ curl -s -S -f --max-time 5 -L $BOOTLOADER_SOURCE --output target/bootloader.bin_new
273
273
274
274
if [ $? -ne 0 ]; then
275
275
if [ -f target/bootloader.bin ]; then
Original file line number Diff line number Diff line change @@ -161,7 +161,23 @@ SECTIONS {
161
161
_external_heap_start = ABSOLUTE (.);
162
162
} > psram_seg
163
163
164
- }
164
+
165
+ /* wifi data */
166
+
167
+ .rwtext.wifi :
168
+ {
169
+ . = ALIGN (4);
170
+ *( .wifi0iram .wifi0iram.*)
171
+ *( .wifirxiram .wifirxiram.*)
172
+ *( .iram1 .iram1.*)
173
+ } > RWTEXT AT > RODATA
174
+
175
+ .data.wifi :
176
+ {
177
+ . = ALIGN (4);
178
+ *( .dram1 .dram1.*)
179
+ } > RWDATA AT > RODATA
180
+ }
165
181
166
182
_external_ram_start = ABSOLUTE (ORIGIN (psram_seg));
167
183
_external_ram_end = ABSOLUTE (ORIGIN (psram_seg)+LENGTH (psram_seg));
@@ -176,4 +192,8 @@ _stack_start_cpu0 = _stack_end_cpu1;
176
192
_stack_end_cpu0 = _stack_start_cpu0 + STACK_SIZE;
177
193
178
194
EXTERN (DefaultHandler );
195
+
196
+ EXTERN (WIFI_EVENT ); /* Force inclusion of WiFi libraries */
197
+
179
198
INCLUDE "device.x"
199
+
Original file line number Diff line number Diff line change 5
5
//! The allocators can be safely used in a mixed fashion. (Including multiple GeneralAllocators
6
6
//! with different thresholds)
7
7
//!
8
+ //! **NOTE: iram can only be accessed by aligned 32-bit accesses, as structures can indicate
9
+ //! alignment >= 4 even when members are smaller, it cannot be used for general rust allocations.
10
+ //! (Unless a load/store exception handler is used, but this will be very slow.)
11
+ //!
8
12
//! **NOTE: the default implementations of memcpy, memset etc. which are used behind the scenes use
9
13
//! unaligned accesses.** This causes exceptions when used together with IRAM.
10
14
//! The replacements in the mem module do handle alignment properly. They can be enable by
@@ -27,7 +31,7 @@ use core::ptr::NonNull;
27
31
use linked_list_allocator:: Heap ;
28
32
29
33
const DEFAULT_EXTERNAL_THRESHOLD : usize = 32 * 1024 ;
30
- const DEFAULT_USE_IRAM : bool = true ;
34
+ const DEFAULT_USE_IRAM : bool = false ;
31
35
32
36
/// Default allocator using a mix of memories.
33
37
///
Original file line number Diff line number Diff line change @@ -136,12 +136,13 @@ impl super::ClockControl {
136
136
///
137
137
/// The second core will start running with the function `entry`.
138
138
pub fn start_app_core ( & mut self , entry : fn ( ) -> !) -> Result < ( ) , Error > {
139
- if self
140
- . dport_control
141
- . appcpu_ctrl_b ( )
142
- . read ( )
143
- . appcpu_clkgate_en ( )
144
- . bit_is_set ( )
139
+ if !xtensa_lx6:: is_debugger_attached ( )
140
+ && self
141
+ . dport_control
142
+ . appcpu_ctrl_b ( )
143
+ . read ( )
144
+ . appcpu_clkgate_en ( )
145
+ . bit_is_set ( )
145
146
{
146
147
return Err ( Error :: CoreAlreadyRunning ) ;
147
148
}
You can’t perform that action at this time.
0 commit comments