From 38b46bfbc8bb145685959abacc8d5a205c1d9b49 Mon Sep 17 00:00:00 2001 From: Wilfred Mallawa Date: Tue, 16 Jan 2024 10:47:22 +1000 Subject: [PATCH 1/4] boards: particle_boron: update tockloader params Signed-off-by: Wilfred Mallawa --- boards/particle_boron/Makefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/boards/particle_boron/Makefile b/boards/particle_boron/Makefile index 457235f059..3ac8098250 100644 --- a/boards/particle_boron/Makefile +++ b/boards/particle_boron/Makefile @@ -11,12 +11,11 @@ include ../Makefile.common TOCKLOADER=tockloader -# Where in the nrf52 flash to load the kernel with `tockloader` +# Where in the nrf52840 flash to load the kernel with `tockloader` KERNEL_ADDRESS=0x00000 # Can be flashed with nrf52dk config -## TODO: Update board to particle_boron when tockloader supports -TOCKLOADER_JTAG_FLAGS = --jlink --board nrf52dk +TOCKLOADER_JTAG_FLAGS = --jlink --board particle_boron # Default target for installing the kernel. .PHONY: install From e6a6ceb7776ee0477065a932f0b2610d3dafa8b2 Mon Sep 17 00:00:00 2001 From: Wilfred Mallawa Date: Wed, 17 Jan 2024 08:59:10 +1000 Subject: [PATCH 2/4] boards: particle_boron: drop pconsole support The process console inteferes with console based apps, as we don't yet have a nice way to implement configurable options, let's drop pconsole for now. Signed-off-by: Wilfred Mallawa --- boards/particle_boron/src/main.rs | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/boards/particle_boron/src/main.rs b/boards/particle_boron/src/main.rs index 43bf555494..3678a3c41a 100644 --- a/boards/particle_boron/src/main.rs +++ b/boards/particle_boron/src/main.rs @@ -100,12 +100,6 @@ pub struct Platform { >, ieee802154_radio: &'static capsules_extra::ieee802154::RadioDriver<'static>, button: &'static capsules_core::button::Button<'static, nrf52840::gpio::GPIOPin<'static>>, - pconsole: &'static capsules_core::process_console::ProcessConsole< - 'static, - { capsules_core::process_console::DEFAULT_COMMAND_HISTORY_LEN }, - VirtualMuxAlarm<'static, nrf52840::rtc::Rtc<'static>>, - components::process_console::Capability, - >, console: &'static capsules_core::console::Console<'static>, gpio: &'static capsules_core::gpio::GPIO<'static, nrf52840::gpio::GPIOPin<'static>>, led: &'static capsules_core::led::LedDriver< @@ -388,17 +382,6 @@ pub unsafe fn start_particle_boron() -> ( let uart_mux = components::console::UartMuxComponent::new(uart_channel, 115200) .finalize(components::uart_mux_component_static!()); - let pconsole = components::process_console::ProcessConsoleComponent::new( - board_kernel, - uart_mux, - mux_alarm, - process_printer, - Some(cortexm4::support::reset), - ) - .finalize(components::process_console_component_static!( - nrf52840::rtc::Rtc<'static> - )); - // Setup the console. let console = components::console::ConsoleComponent::new( board_kernel, @@ -571,7 +554,6 @@ pub unsafe fn start_particle_boron() -> ( button, ble_radio, ieee802154_radio, - pconsole, console, led, gpio, @@ -596,7 +578,6 @@ pub unsafe fn start_particle_boron() -> ( CHIP = Some(chip); debug!("Particle Boron: Initialization complete. Entering main loop\r"); - let _ = platform.pconsole.start(); //-------------------------------------------------------------------------- // PROCESSES AND MAIN LOOP From 26b4433717fa11a980279d7c46a3ac49466596ac Mon Sep 17 00:00:00 2001 From: Wilfred Mallawa Date: Wed, 17 Jan 2024 09:00:37 +1000 Subject: [PATCH 3/4] boards: particle_boron: increase buffer size and speed Signed-off-by: Wilfred Mallawa --- boards/particle_boron/src/main.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/boards/particle_boron/src/main.rs b/boards/particle_boron/src/main.rs index 3678a3c41a..a67b174f74 100644 --- a/boards/particle_boron/src/main.rs +++ b/boards/particle_boron/src/main.rs @@ -507,9 +507,9 @@ pub unsafe fn start_particle_boron() -> ( // I2C Master/Slave //-------------------------------------------------------------------------- - let i2c_master_buffer = static_init!([u8; 32], [0; 32]); - let i2c_slave_buffer1 = static_init!([u8; 32], [0; 32]); - let i2c_slave_buffer2 = static_init!([u8; 32], [0; 32]); + let i2c_master_buffer = static_init!([u8; 128], [0; 128]); + let i2c_slave_buffer1 = static_init!([u8; 128], [0; 128]); + let i2c_slave_buffer2 = static_init!([u8; 128], [0; 128]); let i2c_master_slave = static_init!( I2CMasterSlaveDriver>, @@ -532,7 +532,7 @@ pub unsafe fn start_particle_boron() -> ( base_peripherals.twi1.set_slave_client(i2c_master_slave); // Note: strongly suggested to use external pull-ups for higher speeds // to maintain signal integrity. - base_peripherals.twi1.set_speed(nrf52840::i2c::Speed::K100); + base_peripherals.twi1.set_speed(nrf52840::i2c::Speed::K400); // I2C pin cfg for target nrf52840_peripherals.gpio_port[I2C_SDA_PIN].set_i2c_pin_cfg(); From 4c577ce8181e3072ed39d206f6cd3b83d6069ccc Mon Sep 17 00:00:00 2001 From: Wilfred Mallawa Date: Wed, 17 Jan 2024 10:02:05 +1000 Subject: [PATCH 4/4] boards: particle_boron: increase uart kernel buffers Signed-off-by: Wilfred Mallawa --- boards/particle_boron/src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/boards/particle_boron/src/main.rs b/boards/particle_boron/src/main.rs index a67b174f74..8485e93d9d 100644 --- a/boards/particle_boron/src/main.rs +++ b/boards/particle_boron/src/main.rs @@ -380,7 +380,7 @@ pub unsafe fn start_particle_boron() -> ( // Create a shared UART channel for the console and for kernel debug. let uart_mux = components::console::UartMuxComponent::new(uart_channel, 115200) - .finalize(components::uart_mux_component_static!()); + .finalize(components::uart_mux_component_static!(132)); // Setup the console. let console = components::console::ConsoleComponent::new( @@ -388,7 +388,7 @@ pub unsafe fn start_particle_boron() -> ( capsules_core::console::DRIVER_NUM, uart_mux, ) - .finalize(components::console_component_static!()); + .finalize(components::console_component_static!(132, 132)); // Create the debugger object that handles calls to `debug!()`. components::debug_writer::DebugWriterComponent::new(uart_mux) .finalize(components::debug_writer_component_static!());