pull/273/head
RobertGawron 2025-06-27 08:28:52 +02:00
rodzic 5df277b93a
commit 3520c59edf
6 zmienionych plików z 1750 dodań i 1748 usunięć

Wyświetl plik

@ -1,5 +1,5 @@
# Use an official Ubuntu as a base image
FROM ubuntu:20.04 AS build
FROM ubuntu:25.04 AS build
# Set environment variables to prevent interaction during installation
ENV DEBIAN_FRONTEND=noninteractive
@ -11,84 +11,8 @@ RUN apt-get update && apt-get install -y \
cmake \
pkg-config \
libusb-1.0-0-dev \
&& rm -rf /var/lib/apt/lists/*
# Install stm8flash
RUN git clone https://github.com/vdudouyt/stm8flash.git
RUN cd stm8flash && make -j$(nproc)
# Use another Ubuntu image for runtime
FROM ubuntu:20.04 AS runtime
# Set environment variables to prevent interaction during installation
ENV DEBIAN_FRONTEND=noninteractive
# Install runtime dependencies
RUN apt-get update && apt-get install -y \
libusb-1.0-0 \
sdcc \
build-essential \
cmake \
git \
make \
pkg-config \
libusb-1.0-0-dev \
screen \
doxygen \
uncrustify \
python3-pip \
poppler-utils \
cppcheck \
r-base-core \
shellcheck \
dos2unix \
&& rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y \
python3-venv \
&& rm -rf /var/lib/apt/lists/*
# Copy the stm8flash binary from the build stage
COPY --from=build /stm8flash/stm8flash /usr/bin/
# Install flake8 in a Python virtual environment
RUN python3 -m venv /workspace/venv && \
/workspace/venv/bin/pip install --upgrade pip && \
/workspace/venv/bin/pip install flake8 flake8-html pyserial CodeChecker coverxygen
# Install R libraries
RUN R -e "install.packages('latticeExtra', repos='http://cran.rstudio.com/')"
RUN R -e "install.packages('gridExtra', repos='http://cran.rstudio.com/')"
RUN R -e "install.packages('Hmisc', repos='http://cran.rstudio.com/')"
# Create workspace directory and set it as the working directory
RUN mkdir -p /workspace/build
WORKDIR /workspace/build
RUN apt-get update && apt-get install -y \
libcunit1-dev \
libcmocka-dev \
tree \
vim \
lcov \
gcovr \
clang
RUN /workspace/venv/bin/pip install --upgrade pip && \
/workspace/venv/bin/pip install \
prospector \
vjunit
RUN apt-get update && apt-get install -y \
uncrustify
RUN apt-get update && apt-get install -y \
clang-tidy
RUN apt-get update && apt-get install -y \
openocd
# Command to run the container
CMD ["bash"]

Wyświetl plik

@ -29,7 +29,11 @@ docker-compose exec ionizationchamber bash
End of Work
To log out from the Docker container, press Ctrl+D.
To stop and clean up the Docker environment, use:
To stop and clean up the Docker
environment, use:
docker-compose down --remove-orphans
@ -274,5 +278,87 @@ stm8flash -c stlinkv2 -p stm8s003f3 -w /workspace/firmwarev3/IonizationChamber.e
------------
openocd -f interface/stlink.cfg -f target/stm8s.cfg -c "program /workspace/firmwarev3/IonizationChamber.elf verify reset exit"
openocd -f interface/stlink.cfg -f target/stm8s.cfg -c "program IonizationChamber.elf verify reset exit"
-------------
SWITCH TO MAKFILE
openocd -f interface/stlink.cfg -f target/stm8s.cfg -c "init; reset halt; load_image IonizationChamber.elf 0x8000; reset halt; exit"
openocd \
-f interface/stlink.cfg \
-f target/stm8s.cfg \
-c "init; reset halt; load_image /workspace/Software/Firmware/IonizationChamber.elf 0x8000; reset halt"
stm8-gdb /workspace/Software/Firmware/IonizationChamber.elf \
-ex "set architecture stm8" \
-ex "target extended-remote :3333"
for sdcc to have elf
sudo apt install build-essential libboost-all-dev bison flex texinfo zlib1g-dev
we dont have elf possibility in this shit
need to update docker for ubuntu version
sudo apt install software-properties-common
root@faedc67c011c:/workspace/Software/Firmware# add-apt-repository ppa:mhier/libboost-latest
it all failed try again:
sudo add-apt-repository ppa:mhier/libboost-latest
sudo apt update
Step 2: Install the desired Boost version (e.g., 1.83)
sudo apt install libboost1.83-dev
and then faild, disable other chips:
./configure --enable-stm8 --disable-hc08 --disable-s08 --disable-mcs51 --disable-z80 --disable-z180 --disable-r2k --disable-r3ka --disable-gbz80 --disable-tlcs90 --disable-ds390 --disable-ds400 --disable-pic14 --disable-pic16 --disable-ucsim
===========================
give up, start new docker
apt install autoconf automake libtool
git clone git@github.com:ntfreak/openocd.git
cd openocd
./bootstrap
./configure
make -j24
make install
what?
git config --global --add safe.directory /workspace/Software/downloads/openocd
./configure --disable-werror
-- shit didint work
apt-get install texinfo
ok make sure the link is ok to the gz file
CPPFLAGS="-D_XOPEN_SOURCE=1"

Wyświetl plik

@ -29,14 +29,13 @@
/* Includes ------------------------------------------------------------------*/
#include "stm8_it.h"
#include "application_builder.h"
#include "user_interface.h"
#include "app_builder.h"
/** @addtogroup Template_Project
* @{
*/
#include "application_builder.h" // Include the flag declaration
extern unsigned char timer_flag;
/* Private typedef -----------------------------------------------------------*/
@ -241,12 +240,13 @@ INTERRUPT_HANDLER(TIM1_UPD_OVF_TRG_BRK_IRQHandler, 11)
USER_INTERFACE_COLLECTING_DATA_MSG,
USER_INTERFACE_DISABLE);
*/
user_interface_update_message(
USER_INTERFACE_COLLECTING_DATA_MSG,
USER_INTERFACE_ENABLE);
app_tick_flag = 1;
/*
user_interface_update_message(
USER_INTERFACE_COLLECTING_DATA_MSG,
USER_INTERFACE_ENABLE);
*/
xx app_builder_tick();
// app_tick_flag = 1;
TIM1_ClearITPendingBit(TIM1_IT_UPDATE);
}

Wyświetl plik

@ -1,22 +0,0 @@
# STM8 Debug Configuration for OpenOCD 0.10.0
interface stlink
transport select swim
# STM8S003 Settings
set CHIPNAME stm8s003
# Target setup
swim newtap $CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf
target create $CHIPNAME.cpu stm8 -endian little -chain-position $CHIPNAME.cpu
# Flash configuration (8KB)
flash bank $_FLASHNAME stm8 0x8000 0 0 0 $CHIPNAME.cpu
# Reset configuration
reset_config srst_only
# Speed settings
stlink_set_swd_freq 100
# Initialize
init

Wyświetl plik

@ -1,10 +0,0 @@
# stm8s003.cfg
source [find target/swim.cfg]
transport select swim
# Chip parameters (adjust as needed)
set CHIPNAME stm8s003
set WORKAREASIZE 0x400 # RAM size
# Flash configuration
flash bank $_FLASHNAME stm8 0x8000 0 0 0 $_TARGETNAME