mirror of
https://github.com/ferrous-systems/embedded-trainings-2020.git
synced 2025-01-24 06:48:11 +00:00
increase rtt buffer & number of attach retries
This commit is contained in:
parent
d7cc36d237
commit
56abdbad34
2 changed files with 3 additions and 3 deletions
|
@ -178,9 +178,9 @@ pub fn init() -> Result<Board, ()> {
|
||||||
// NOTE this must be executed as early as possible or the tool will timeout
|
// NOTE this must be executed as early as possible or the tool will timeout
|
||||||
// NOTE the unsafety of this macro is incorrect; it must be run at most once
|
// NOTE the unsafety of this macro is incorrect; it must be run at most once
|
||||||
#[cfg(feature = "beginner")]
|
#[cfg(feature = "beginner")]
|
||||||
rtt_init_print!(BlockIfFull, 4096);
|
rtt_init_print!(BlockIfFull, 16384);
|
||||||
#[cfg(feature = "advanced")]
|
#[cfg(feature = "advanced")]
|
||||||
rtt_init_print!(NoBlockSkip, 4096);
|
rtt_init_print!(NoBlockSkip, 16384);
|
||||||
|
|
||||||
log::set_logger(&Logger).unwrap();
|
log::set_logger(&Logger).unwrap();
|
||||||
|
|
||||||
|
|
|
@ -195,7 +195,7 @@ fn notmain() -> Result<i32, anyhow::Error> {
|
||||||
let rtt_addr_res = rtt_addr.ok_or_else(|| anyhow!("RTT control block not available"))?;
|
let rtt_addr_res = rtt_addr.ok_or_else(|| anyhow!("RTT control block not available"))?;
|
||||||
let mut rtt_res: Result<Rtt, probe_rs_rtt::Error> =
|
let mut rtt_res: Result<Rtt, probe_rs_rtt::Error> =
|
||||||
Err(probe_rs_rtt::Error::ControlBlockNotFound);
|
Err(probe_rs_rtt::Error::ControlBlockNotFound);
|
||||||
const NUM_RETRIES: usize = 3; // picked at random, increase if necessary
|
const NUM_RETRIES: usize = 5; // picked at random, increase if necessary
|
||||||
|
|
||||||
for try_index in 0..=NUM_RETRIES {
|
for try_index in 0..=NUM_RETRIES {
|
||||||
rtt_res = Rtt::attach_region(core.clone(), &sess, &ScanRegion::Exact(rtt_addr_res));
|
rtt_res = Rtt::attach_region(core.clone(), &sess, &ScanRegion::Exact(rtt_addr_res));
|
||||||
|
|
Loading…
Reference in a new issue