Skip to content

Commit f27b1af

Browse files
committed
Clean up
1 parent b3e4421 commit f27b1af

File tree

9 files changed

+68
-72
lines changed

9 files changed

+68
-72
lines changed

logs/libapp-demangle.S

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ Disassembly of section .text._ZN3app10app_sensor21start_sensor_listener17h090884
401401

402402
00000000 <app::app_sensor::start_sensor_listener>:
403403
_ZN3app10app_sensor21start_sensor_listener17h09088494e967a630E():
404-
/Users/Luppy/mynewt/stm32bluepill-mynewt-sensor/rust/app/src/app_sensor.rs:47
404+
/Users/Luppy/mynewt/stm32bluepill-mynewt-sensor/rust/app/src/app_sensor.rs:46
405405
/// Type of sensor: Raw temperature sensor (integer sensor values 0 to 4095)
406406
const TEMP_SENSOR_TYPE: sensor_type_t = sensor::SENSOR_TYPE_AMBIENT_TEMPERATURE_RAW;
407407

@@ -410,14 +410,14 @@ const TEMP_SENSOR_TYPE: sensor_type_t = sensor::SENSOR_TYPE_AMBIENT_TEMPERATURE_
410410
pub fn start_sensor_listener() -> MynewtResult<()> { // Returns an error code upon error.
411411
0: b5f0 push {r4, r5, r6, r7, lr}
412412
2: b0bd sub sp, #244 ; 0xf4
413-
/Users/Luppy/mynewt/stm32bluepill-mynewt-sensor/rust/app/src/app_sensor.rs:48
413+
/Users/Luppy/mynewt/stm32bluepill-mynewt-sensor/rust/app/src/app_sensor.rs:47
414414
console::print("Rust TMP poll\n");
415415
4: f240 0000 movw r0, #0
416416
8: f2c0 0000 movt r0, #0
417417
c: 210e movs r1, #14
418418
e: f7ff fffe bl 0 <mynewt::sys::console::print>
419419
12: e7ff b.n 2 <app::app_sensor::start_sensor_listener+0x2>
420-
/Users/Luppy/mynewt/stm32bluepill-mynewt-sensor/rust/app/src/app_sensor.rs:51
420+
/Users/Luppy/mynewt/stm32bluepill-mynewt-sensor/rust/app/src/app_sensor.rs:50
421421

422422
// Fetch the sensor by name.
423423
let sensor = sensor_mgr::find_bydevname(&SENSOR_DEVICE)
@@ -439,7 +439,7 @@ pub fn start_sensor_listener() -> MynewtResult<()> { // Returns an error code
439439
3e: f7ff fffe bl 0 <core::option::Option<T>::expect>
440440
42: 900c str r0, [sp, #48] ; 0x30
441441
44: e7ff b.n 46 <app::app_sensor::start_sensor_listener+0x46>
442-
/Users/Luppy/mynewt/stm32bluepill-mynewt-sensor/rust/app/src/app_sensor.rs:56
442+
/Users/Luppy/mynewt/stm32bluepill-mynewt-sensor/rust/app/src/app_sensor.rs:55
443443
.next() // Fetch the first sensor that matches
444444
.expect("no TMP"); // Stop if no sensor found
445445

@@ -467,14 +467,14 @@ pub fn start_sensor_listener() -> MynewtResult<()> { // Returns an error code
467467
76: 2801 cmp r0, #1
468468
78: d001 beq.n 7e <app::app_sensor::start_sensor_listener+0x7e>
469469
7a: e7ff b.n 7c <app::app_sensor::start_sensor_listener+0x7c>
470-
/Users/Luppy/mynewt/stm32bluepill-mynewt-sensor/rust/app/src/app_sensor.rs:70
470+
/Users/Luppy/mynewt/stm32bluepill-mynewt-sensor/rust/app/src/app_sensor.rs:69
471471
// Register the Listener Function to be called with the polled sensor data.
472472
sensor::register_listener(sensor, listener) ? ; // `?` means in case of error, return error now.
473473

474474
// Return `Ok()` to indicate success. This line should not end with a semicolon (;).
475475
Ok(())
476476
7c: defe udf #254 ; 0xfe
477-
/Users/Luppy/mynewt/stm32bluepill-mynewt-sensor/rust/app/src/app_sensor.rs:56
477+
/Users/Luppy/mynewt/stm32bluepill-mynewt-sensor/rust/app/src/app_sensor.rs:55
478478
sensor::set_poll_rate_ms(&SENSOR_DEVICE, SENSOR_POLL_TIME) ? ;
479479
7e: 9811 ldr r0, [sp, #68] ; 0x44
480480
80: 9012 str r0, [sp, #72] ; 0x48
@@ -487,14 +487,14 @@ pub fn start_sensor_listener() -> MynewtResult<()> { // Returns an error code
487487
92: 900b str r0, [sp, #44] ; 0x2c
488488
94: e7ff b.n 96 <app::app_sensor::start_sensor_listener+0x96>
489489
96: e002 b.n 9e <app::app_sensor::start_sensor_listener+0x9e>
490-
/Users/Luppy/mynewt/stm32bluepill-mynewt-sensor/rust/app/src/app_sensor.rs:70
490+
/Users/Luppy/mynewt/stm32bluepill-mynewt-sensor/rust/app/src/app_sensor.rs:69
491491
98: 980b ldr r0, [sp, #44] ; 0x2c
492492
9a: b03d add sp, #244 ; 0xf4
493493
9c: bdf0 pop {r4, r5, r6, r7, pc}
494-
/Users/Luppy/mynewt/stm32bluepill-mynewt-sensor/rust/app/src/app_sensor.rs:56
494+
/Users/Luppy/mynewt/stm32bluepill-mynewt-sensor/rust/app/src/app_sensor.rs:55
495495
sensor::set_poll_rate_ms(&SENSOR_DEVICE, SENSOR_POLL_TIME) ? ;
496496
9e: e7fb b.n 98 <app::app_sensor::start_sensor_listener+0x98>
497-
/Users/Luppy/mynewt/stm32bluepill-mynewt-sensor/rust/app/src/app_sensor.rs:59
497+
/Users/Luppy/mynewt/stm32bluepill-mynewt-sensor/rust/app/src/app_sensor.rs:58
498498
let listener = sensor::new_sensor_listener(
499499
a0: f240 0000 movw r0, #0
500500
a4: f2c0 0000 movt r0, #0
@@ -511,7 +511,7 @@ pub fn start_sensor_listener() -> MynewtResult<()> { // Returns an error code
511511
c4: a922 add r1, sp, #136 ; 0x88
512512
c6: f7ff fffe bl 0 <<core::result::Result<T,E> as core::ops::try::Try>::into_result>
513513
ca: e7ff b.n cc <app::app_sensor::start_sensor_listener+0xcc>
514-
/Users/Luppy/mynewt/stm32bluepill-mynewt-sensor/rust/app/src/app_sensor.rs:63
514+
/Users/Luppy/mynewt/stm32bluepill-mynewt-sensor/rust/app/src/app_sensor.rs:62
515515
) ? ;
516516
cc: 981a ldr r0, [sp, #104] ; 0x68
517517
ce: 2800 cmp r0, #0
@@ -535,7 +535,7 @@ pub fn start_sensor_listener() -> MynewtResult<()> { // Returns an error code
535535
f6: e7ff b.n f8 <app::app_sensor::start_sensor_listener+0xf8>
536536
f8: e7d1 b.n 9e <app::app_sensor::start_sensor_listener+0x9e>
537537
fa: a81a add r0, sp, #104 ; 0x68
538-
/Users/Luppy/mynewt/stm32bluepill-mynewt-sensor/rust/app/src/app_sensor.rs:59
538+
/Users/Luppy/mynewt/stm32bluepill-mynewt-sensor/rust/app/src/app_sensor.rs:58
539539
let listener = sensor::new_sensor_listener(
540540
fc: 3008 adds r0, #8
541541
fe: a92c add r1, sp, #176 ; 0xb0
@@ -546,7 +546,7 @@ pub fn start_sensor_listener() -> MynewtResult<()> { // Returns an error code
546546
10c: 4602 mov r2, r0
547547
10e: e891 5078 ldmia.w r1, {r3, r4, r5, r6, ip, lr}
548548
112: e882 5078 stmia.w r2, {r3, r4, r5, r6, ip, lr}
549-
/Users/Luppy/mynewt/stm32bluepill-mynewt-sensor/rust/app/src/app_sensor.rs:66
549+
/Users/Luppy/mynewt/stm32bluepill-mynewt-sensor/rust/app/src/app_sensor.rs:65
550550
sensor::register_listener(sensor, listener) ? ; // `?` means in case of error, return error now.
551551
116: 990c ldr r1, [sp, #48] ; 0x30
552552
118: aa34 add r2, sp, #208 ; 0xd0
@@ -586,12 +586,12 @@ pub fn start_sensor_listener() -> MynewtResult<()> { // Returns an error code
586586
168: e7ff b.n 16a <app::app_sensor::start_sensor_listener+0x16a>
587587
16a: e7c5 b.n f8 <app::app_sensor::start_sensor_listener+0xf8>
588588
16c: 2000 movs r0, #0
589-
/Users/Luppy/mynewt/stm32bluepill-mynewt-sensor/rust/app/src/app_sensor.rs:69
589+
/Users/Luppy/mynewt/stm32bluepill-mynewt-sensor/rust/app/src/app_sensor.rs:68
590590
Ok(())
591591
16e: 900b str r0, [sp, #44] ; 0x2c
592592
170: 2001 movs r0, #1
593593
172: 900b str r0, [sp, #44] ; 0x2c
594-
/Users/Luppy/mynewt/stm32bluepill-mynewt-sensor/rust/app/src/app_sensor.rs:70
594+
/Users/Luppy/mynewt/stm32bluepill-mynewt-sensor/rust/app/src/app_sensor.rs:69
595595
174: e790 b.n 98 <app::app_sensor::start_sensor_listener+0x98>
596596

597597
app-b90ce02d7e477c3f.35j0kb8s1vhb4ukq.rcgu.o: file format elf32-littlearm

logs/libapp-expanded.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ mod app_sensor {
321321
sys::console, Strn};
322322
use mynewt_macros::{init_strn};
323323
use crate::app_network;
324-
/// Sensor to be polled: `temp_stm32_0` is the internal temperature sensor
324+
/// Sensor to be polled: `temp_stub_0` is the stub temperature sensor that simulates a temperature sensor
325325
static SENSOR_DEVICE: Strn =
326326
Strn{rep: mynewt::StrnRep::ByteStr(b"temp_stub_0\x00"),};
327327
/// Poll sensor every 10,000 milliseconds (10 seconds)

logs/libapp.S

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ Disassembly of section .text._ZN3app10app_sensor21start_sensor_listener17h090884
401401

402402
00000000 <_ZN3app10app_sensor21start_sensor_listener17h09088494e967a630E>:
403403
_ZN3app10app_sensor21start_sensor_listener17h09088494e967a630E():
404-
/Users/Luppy/mynewt/stm32bluepill-mynewt-sensor/rust/app/src/app_sensor.rs:47
404+
/Users/Luppy/mynewt/stm32bluepill-mynewt-sensor/rust/app/src/app_sensor.rs:46
405405
/// Type of sensor: Raw temperature sensor (integer sensor values 0 to 4095)
406406
const TEMP_SENSOR_TYPE: sensor_type_t = sensor::SENSOR_TYPE_AMBIENT_TEMPERATURE_RAW;
407407

@@ -410,14 +410,14 @@ const TEMP_SENSOR_TYPE: sensor_type_t = sensor::SENSOR_TYPE_AMBIENT_TEMPERATURE_
410410
pub fn start_sensor_listener() -> MynewtResult<()> { // Returns an error code upon error.
411411
0: b5f0 push {r4, r5, r6, r7, lr}
412412
2: b0bd sub sp, #244 ; 0xf4
413-
/Users/Luppy/mynewt/stm32bluepill-mynewt-sensor/rust/app/src/app_sensor.rs:48
413+
/Users/Luppy/mynewt/stm32bluepill-mynewt-sensor/rust/app/src/app_sensor.rs:47
414414
console::print("Rust TMP poll\n");
415415
4: f240 0000 movw r0, #0
416416
8: f2c0 0000 movt r0, #0
417417
c: 210e movs r1, #14
418418
e: f7ff fffe bl 0 <_ZN6mynewt3sys7console5print17h0f65bc3b0e739871E>
419419
12: e7ff b.n 2 <_ZN3app10app_sensor21start_sensor_listener17h09088494e967a630E+0x2>
420-
/Users/Luppy/mynewt/stm32bluepill-mynewt-sensor/rust/app/src/app_sensor.rs:51
420+
/Users/Luppy/mynewt/stm32bluepill-mynewt-sensor/rust/app/src/app_sensor.rs:50
421421

422422
// Fetch the sensor by name.
423423
let sensor = sensor_mgr::find_bydevname(&SENSOR_DEVICE)
@@ -439,7 +439,7 @@ pub fn start_sensor_listener() -> MynewtResult<()> { // Returns an error code
439439
3e: f7ff fffe bl 0 <_ZN4core6option15Option$LT$T$GT$6expect17h0fd15c4bf762390eE>
440440
42: 900c str r0, [sp, #48] ; 0x30
441441
44: e7ff b.n 46 <_ZN3app10app_sensor21start_sensor_listener17h09088494e967a630E+0x46>
442-
/Users/Luppy/mynewt/stm32bluepill-mynewt-sensor/rust/app/src/app_sensor.rs:56
442+
/Users/Luppy/mynewt/stm32bluepill-mynewt-sensor/rust/app/src/app_sensor.rs:55
443443
.next() // Fetch the first sensor that matches
444444
.expect("no TMP"); // Stop if no sensor found
445445

@@ -467,14 +467,14 @@ pub fn start_sensor_listener() -> MynewtResult<()> { // Returns an error code
467467
76: 2801 cmp r0, #1
468468
78: d001 beq.n 7e <_ZN3app10app_sensor21start_sensor_listener17h09088494e967a630E+0x7e>
469469
7a: e7ff b.n 7c <_ZN3app10app_sensor21start_sensor_listener17h09088494e967a630E+0x7c>
470-
/Users/Luppy/mynewt/stm32bluepill-mynewt-sensor/rust/app/src/app_sensor.rs:70
470+
/Users/Luppy/mynewt/stm32bluepill-mynewt-sensor/rust/app/src/app_sensor.rs:69
471471
// Register the Listener Function to be called with the polled sensor data.
472472
sensor::register_listener(sensor, listener) ? ; // `?` means in case of error, return error now.
473473

474474
// Return `Ok()` to indicate success. This line should not end with a semicolon (;).
475475
Ok(())
476476
7c: defe udf #254 ; 0xfe
477-
/Users/Luppy/mynewt/stm32bluepill-mynewt-sensor/rust/app/src/app_sensor.rs:56
477+
/Users/Luppy/mynewt/stm32bluepill-mynewt-sensor/rust/app/src/app_sensor.rs:55
478478
sensor::set_poll_rate_ms(&SENSOR_DEVICE, SENSOR_POLL_TIME) ? ;
479479
7e: 9811 ldr r0, [sp, #68] ; 0x44
480480
80: 9012 str r0, [sp, #72] ; 0x48
@@ -487,14 +487,14 @@ pub fn start_sensor_listener() -> MynewtResult<()> { // Returns an error code
487487
92: 900b str r0, [sp, #44] ; 0x2c
488488
94: e7ff b.n 96 <_ZN3app10app_sensor21start_sensor_listener17h09088494e967a630E+0x96>
489489
96: e002 b.n 9e <_ZN3app10app_sensor21start_sensor_listener17h09088494e967a630E+0x9e>
490-
/Users/Luppy/mynewt/stm32bluepill-mynewt-sensor/rust/app/src/app_sensor.rs:70
490+
/Users/Luppy/mynewt/stm32bluepill-mynewt-sensor/rust/app/src/app_sensor.rs:69
491491
98: 980b ldr r0, [sp, #44] ; 0x2c
492492
9a: b03d add sp, #244 ; 0xf4
493493
9c: bdf0 pop {r4, r5, r6, r7, pc}
494-
/Users/Luppy/mynewt/stm32bluepill-mynewt-sensor/rust/app/src/app_sensor.rs:56
494+
/Users/Luppy/mynewt/stm32bluepill-mynewt-sensor/rust/app/src/app_sensor.rs:55
495495
sensor::set_poll_rate_ms(&SENSOR_DEVICE, SENSOR_POLL_TIME) ? ;
496496
9e: e7fb b.n 98 <_ZN3app10app_sensor21start_sensor_listener17h09088494e967a630E+0x98>
497-
/Users/Luppy/mynewt/stm32bluepill-mynewt-sensor/rust/app/src/app_sensor.rs:59
497+
/Users/Luppy/mynewt/stm32bluepill-mynewt-sensor/rust/app/src/app_sensor.rs:58
498498
let listener = sensor::new_sensor_listener(
499499
a0: f240 0000 movw r0, #0
500500
a4: f2c0 0000 movt r0, #0
@@ -511,7 +511,7 @@ pub fn start_sensor_listener() -> MynewtResult<()> { // Returns an error code
511511
c4: a922 add r1, sp, #136 ; 0x88
512512
c6: f7ff fffe bl 0 <_ZN73_$LT$core..result..Result$LT$T$C$E$GT$$u20$as$u20$core..ops..try..Try$GT$11into_result17h470504b6f43ee880E>
513513
ca: e7ff b.n cc <_ZN3app10app_sensor21start_sensor_listener17h09088494e967a630E+0xcc>
514-
/Users/Luppy/mynewt/stm32bluepill-mynewt-sensor/rust/app/src/app_sensor.rs:63
514+
/Users/Luppy/mynewt/stm32bluepill-mynewt-sensor/rust/app/src/app_sensor.rs:62
515515
) ? ;
516516
cc: 981a ldr r0, [sp, #104] ; 0x68
517517
ce: 2800 cmp r0, #0
@@ -535,7 +535,7 @@ pub fn start_sensor_listener() -> MynewtResult<()> { // Returns an error code
535535
f6: e7ff b.n f8 <_ZN3app10app_sensor21start_sensor_listener17h09088494e967a630E+0xf8>
536536
f8: e7d1 b.n 9e <_ZN3app10app_sensor21start_sensor_listener17h09088494e967a630E+0x9e>
537537
fa: a81a add r0, sp, #104 ; 0x68
538-
/Users/Luppy/mynewt/stm32bluepill-mynewt-sensor/rust/app/src/app_sensor.rs:59
538+
/Users/Luppy/mynewt/stm32bluepill-mynewt-sensor/rust/app/src/app_sensor.rs:58
539539
let listener = sensor::new_sensor_listener(
540540
fc: 3008 adds r0, #8
541541
fe: a92c add r1, sp, #176 ; 0xb0
@@ -546,7 +546,7 @@ pub fn start_sensor_listener() -> MynewtResult<()> { // Returns an error code
546546
10c: 4602 mov r2, r0
547547
10e: e891 5078 ldmia.w r1, {r3, r4, r5, r6, ip, lr}
548548
112: e882 5078 stmia.w r2, {r3, r4, r5, r6, ip, lr}
549-
/Users/Luppy/mynewt/stm32bluepill-mynewt-sensor/rust/app/src/app_sensor.rs:66
549+
/Users/Luppy/mynewt/stm32bluepill-mynewt-sensor/rust/app/src/app_sensor.rs:65
550550
sensor::register_listener(sensor, listener) ? ; // `?` means in case of error, return error now.
551551
116: 990c ldr r1, [sp, #48] ; 0x30
552552
118: aa34 add r2, sp, #208 ; 0xd0
@@ -586,12 +586,12 @@ pub fn start_sensor_listener() -> MynewtResult<()> { // Returns an error code
586586
168: e7ff b.n 16a <_ZN3app10app_sensor21start_sensor_listener17h09088494e967a630E+0x16a>
587587
16a: e7c5 b.n f8 <_ZN3app10app_sensor21start_sensor_listener17h09088494e967a630E+0xf8>
588588
16c: 2000 movs r0, #0
589-
/Users/Luppy/mynewt/stm32bluepill-mynewt-sensor/rust/app/src/app_sensor.rs:69
589+
/Users/Luppy/mynewt/stm32bluepill-mynewt-sensor/rust/app/src/app_sensor.rs:68
590590
Ok(())
591591
16e: 900b str r0, [sp, #44] ; 0x2c
592592
170: 2001 movs r0, #1
593593
172: 900b str r0, [sp, #44] ; 0x2c
594-
/Users/Luppy/mynewt/stm32bluepill-mynewt-sensor/rust/app/src/app_sensor.rs:70
594+
/Users/Luppy/mynewt/stm32bluepill-mynewt-sensor/rust/app/src/app_sensor.rs:69
595595
174: e790 b.n 98 <_ZN3app10app_sensor21start_sensor_listener17h09088494e967a630E+0x98>
596596

597597
app-b90ce02d7e477c3f.35j0kb8s1vhb4ukq.rcgu.o: file format elf32-littlearm

logs/libapp.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)