.@beagleboardorg launched the BeagleV®-Fire, a new SBC that opens up new horizons for developers, tinkerers and more to explore the vast potential of #RISCV architecture and FPGA technology: https://riscv.org/news/2023/11/beagleboard-org-makes-fpga-and-risc-v-accessible-with-new-beaglev-fire-single-board-computer-at-150/?hss_channel=tw-2694452875 #RISCVeverywhere
Original tweet: https://twitter.com/risc_v/status/1723024225127076007
Did you know you could control brightness of the red dot on the i of the "ThinkPad" on the top-side of your thinkpad? I sure didn't:
this turns it off:
echo 0 | sudo tee /sys/class/leds/tpacpi\:\:lid_logo_dot/brightness
and this turns it on:
echo 255 | sudo tee /sys/class/leds/tpacpi\:\:lid_logo_dot/brightness
I don't really know what this information is good for, but hey, isn't it awesome to have a 1px display on the outside of your laptop?
@liw I’ve tried this for out of memory conditions (aka memory exhaustion) in Rust but there’s no -ENOMEM :-) In unstable there is handle_alloc_error() but it is. sort of complicated track to adapt. Would be nice if you could do this every and each at the site, as callback indirection sucks…
In this thread I see one common and wrong conclusion:
“Yeah, but there are also other application areas, such as embedded environments with less RAM and no memory overcomittment.”
For restricted embedded payloads and stuff like that you usually define metrics already at the compile time, and use crates such as heapless. It is exactly dynamic over-committed memory where it would be nice to explicitly deal with this unexpected corner case.
It is pretty hard to sometimes discuss about memory issues in Rust with “rustaceans” because they are living in the myth of Rust being memory-safe. Nothing is never fully memory-safe.
@liw I’ve tried this for out of memory conditions (aka memory exhaustion) in Rust but there’s no -ENOMEM :-) In unstable there is handle_alloc_error() but it is. sort of complicated track to adapt. Would be nice if you could do this every and each at the site, as callback indirection sucks…
In this thread I see one common and wrong conclusion:
“Yeah, but there are also other application areas, such as embedded environments with less RAM and no memory overcomittment.”
For restricted embedded payloads and stuff like that you usually define metrics already at the compile time, and use crates such as heapless. It is exactly dynamic over-committed memory where it would be nice to explicitly deal with this unexpected corner case.
It is pretty hard to sometimes discuss about memory issues in Rust with “rustaceans” because they are living in the myth of Rust being memory-safe. Nothing is never fully memory-safe.
@jmorris given that this is possible i would give it a shot in the similar situation. there’s lot of nostd stuff that you can probably easily adapt to this framework like my go-to rust library heapless.
i’ve taken practice even in non-embedded (user space) rust that i prefer nostd and heapless structures to the max over features when picking dependencies for a rust program. sort of addition of minimizing the number of unsafe regions is to minimize the number of heapful regions.
macro(import_binary_as_elf Path Symbol Target)
set(objcopy_flags -I binary -O default -B riscv)
string(MAKE_C_IDENTIFIER ${Path} unstripped)
add_custom_command(
OUTPUT ${Path}.elf
DEPENDS ${Target}
COMMAND
${CMAKE_OBJCOPY} ${objcopy_flags}
${Path} ${Path}.elf
COMMAND
${CMAKE_OBJCOPY} -N
_binary_${unstripped}_end ${Path}.elf
COMMAND
${CMAKE_OBJCOPY} --redefine-sym
_binary_${unstripped}_start=${Symbol}_start
${Path}.elf
COMMAND
${CMAKE_OBJCOPY} --redefine-sym
_binary_${unstripped}_size=${Symbol}_size
${Path}.elf
)
add_custom_target(${Symbol}_elf DEPENDS ${Path}.elf)
endmacro()