marcinbor85 / microshell Goto Github PK
View Code? Open in Web Editor NEWMicroShell is a lightweight pure C implementation of shell emulator dedicated for embedded bare-metal systems.
Home Page: https://microshell.pl
License: MIT License
MicroShell is a lightweight pure C implementation of shell emulator dedicated for embedded bare-metal systems.
Home Page: https://microshell.pl
License: MIT License
compiling environment : IAR 8.50.9
An error is displayed:
void ush_autocomp_check_for_finish(struct ush_object *self)
{
char abs_path[self->desc->path_max_length];
..................
}
Error[Pe060]: this operator is not allowed in an integral constant expression
PATJ: mcushell\src\ush_autocomp_utils.c 72
In several function interfaces, the definition of a character array prompts a similar error。
Pretty self explanatory, using ush_print multiple times successively only prints the last command issued.
I have non blocking reads and writes set up over UART using HAL_UART_Transmit_IT and HAL_UART_Receive_IT, and when I paste into the terminal, it sometimes misses characters.
I have adjusted buffer sizes, and various UART settings to no avail.
Would be happy to gather some data to help troubleshoot this issue, but I am not entirely sure where to start.
Here's what I did
After adding
cmake_minimum_required(VERSION 3.20)
project(MicroShell)
To CMakeLists.txt to top cmake moaning.
mkdir build
cd build
cmake ..
CMake Error at CMakeLists.txt:7 (build_ush):
Unknown CMake command "build_ush".
-- Configuring incomplete, errors occurred!
See also "/home/andrewh/Source/microshell/examples/demo_linux/CMakeFiles/CMakeOutput.log".
Please advise
Compiling with arm-none-eabi GCC 8.3.1 (target is RP2040) - in the hex printing routine of ush_cmd_xxd.c
there is a size mismatch of the formatted string and the item passed to sprintf()
.
Build output:
src/commands/ush_cmd_xxd.c: In function 'ush_buildin_cmd_xxd_service':
src/commands/ush_cmd_xxd.c:80:64: error: format '%X' expects argument of type 'unsigned int', but argument 3 has type 'long unsigned int' [-Werror=format=]
sprintf(self->desc->output_buffer, "%08X: ", (uint32_t)self->process_index_item);
~~~^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
%08lX
As shown above the error can be fixed by using %08lX
(long) format rather than %08X
. I think perhaps this issue does not arise when compiling for POSIX, but does on ARM?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.