Le support aux utilisateurs et les demandes de création de comptes externes doivent être faites depuis les issues du projet GitLab HEFR (https://gitlab.forge.hefr.ch/forge-hefr/gitlab-hefr)

A partir du 12 octobre 2020, les artifacts générés par le CI/CD auront un délai d'expiration par défaut de 30 jours. Ca signifie que les artifacts seront supprimés - au plus tôt - 30 jours après leur création et ça concerne aussi les artifacts existants. Vous pouvez changer ce délai dans la configuration de votre CI/CD. Si vous souhaitez discuter cette nouvelle mesure, merci de créer une issue sur le projet GitLab HEFR.

Commit 4839f728 authored by Jacques Supcik's avatar Jacques Supcik

Initial commit

parents
FROM ubuntu:bionic
LABEL maintainer "Jacques Supcik <jacques.supcik@hefr.ch>"
RUN apt-get update && apt-get install -y \
clang \
clang-tools \
cmake \
curl \
file \
git \
make \
python3 \
python3-pip \
unzip
RUN cd /opt && curl -sL https://developer.arm.com/-/media/Files/downloads/gnu-rm/8-2019q3/RC1.1/gcc-arm-none-eabi-8-2019-q3-update-linux.tar.bz2 | tar jxf -
ENV PATH=${PATH}:/opt/gcc-arm-none-eabi-8-2019-q3-update/bin
RUN pip3 install chardet cpplint
# Get the latest libbbb from gitlab
RUN cd /tmp && \
curl -L https://gitlab.forge.hefr.ch/embsys/libbbb/-/jobs/artifacts/master/download?job=build --output t.zip && \
unzip t.zip && \
cd build && \
tar zxvf libbbb-*-arm-none-eabi.tar.gz && \
cp -l /tmp/build/libbbb-*-arm-none-eabi/include/* /usr/arm-none-eabi/include/ && \
cp -l /tmp/build/libbbb-*-arm-none-eabi/lib/* /usr/arm-none-eabi/lib/
# Copy makefiles, headers and library to /se12/bbb for compatibility
COPY make.d /se12/bbb/make
RUN mkdir /se12/bbb/source && \
cp -l /tmp/build/libbbb-*-arm-none-eabi/include/* /se12/bbb/source && \
cp -l /tmp/build/libbbb-*-arm-none-eabi/lib/* /se12/bbb/source
ENV LMIBASE="/se12"
# cleanup
RUN rm -Rf /tmp/t.zip /tmp/build
WORKDIR /se12
This diff is collapsed.
# docker-se12-builder
This Docker contains the tools needed to cross compile the sources
of the embedded systems lecture given at the HEIA-FR.
The latest version of the beaglebone library is downloaded from gitlab
\ No newline at end of file
OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
OUTPUT_ARCH(arm)
ENTRY(_start)
/* The memory map */
MEMORY {
SRAM : o = 0x402F0400, l = 0x0000FC00 /* 64KB internal SRAM */
L3OCMC0 : o = 0x40300000, l = 0x00010000 /* 64KB L3 OCMC SRAM */
M3SHUMEM : o = 0x44D00000, l = 0x00004000 /* 16KB M3 Shared Unified Code Space */
M3SHDMEM : o = 0x44D80000, l = 0x00002000 /* 8KB M3 Shared Data Memory */
DDR0 : o = 0x80000000, l = 0x00f00000 /* 15MB on external DDR Bank 0 */
DDR0_dma : o = 0x80f00000, l = 0x00100000 /* 1MB on external DDR Bank 0 */
}
SECTIONS
{
.bootargs (NOLOAD):
{
. = . + 0x1000;
} > DDR0
.text :
{
*(.text_startup)
*(.text*)
/* .ctors */
*crtbegin.o(.ctors)
*crtbegin?.o(.ctors)
*(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
*(SORT(.ctors.*))
*(.ctors)
/* .dtors */
*crtbegin.o(.dtors)
*crtbegin?.o(.dtors)
*(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
*(SORT(.dtors.*))
*(.dtors)
KEEP(*(.eh_frame*))
} > DDR0
.rodata :
{
. = ALIGN(0x100);
*(.rodata*)
} >DDR0
. = ALIGN(0x100);
.ARM.extab :
{
*(.ARM.extab* .gnu.linkonce.armextab.*)
} > DDR0
__exidx_start = .;
.ARM.exidx :
{
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
} > DDR0
__exidx_end = .;
.data :
{
. = ALIGN(0x100);
*(.data*)
. = ALIGN(8);
/* preinit data */
PROVIDE_HIDDEN (__preinit_array_start = .);
KEEP(*(.preinit_array))
PROVIDE_HIDDEN (__preinit_array_end = .);
. = ALIGN(8);
/* init data */
PROVIDE_HIDDEN (__init_array_start = .);
KEEP(*(SORT(.init_array.*)))
KEEP(*(.init_array))
PROVIDE_HIDDEN (__init_array_end = .);
. = ALIGN(8);
/* finit data */
PROVIDE_HIDDEN (__fini_array_start = .);
KEEP(*(SORT(.fini_array.*)))
KEEP(*(.fini_array))
PROVIDE_HIDDEN (__fini_array_end = .);
/* All data end */
. = ALIGN(32);
} >DDR0
.uninitialized (NOLOAD):
{
. = ALIGN(32);
__uninitialized_start = .;
*(.uninitialized)
KEEP(*(.keep.uninitialized))
. = ALIGN(32);
__uninitialized_end = .;
} > DDR0
.bss (NOLOAD):
{
. = ALIGN (0x100);
__bss_start__ = . ;
*(.bss*)
*(COMMON)
. = ALIGN (0x100);
__bss_end__ = .;
} >DDR0
_end = ALIGN(0x100);
_stack_bottom = ORIGIN(DDR0) + LENGTH(DDR0) - 0x80000;
__c_stack_top__ = ORIGIN(DDR0) + LENGTH(DDR0);
.dmasafe (NOLOAD) :
{
*(.dmasafe)
} >DDR0_dma
}
#Standard makefile for LMI labs
ifeq ($(OS),Windows_NT)
DEL=del /F /S /Q
MKDIR=mkdir
RMDIR=rmdir /S /Q
else
DEL=rm -Rf
MKDIR=mkdir -p
RMDIR=rm -Rf
endif
ifneq ($(LIBDIRS),)
LIBALL=lib_all
LIBALL_CLEAN=lib_all_clean
endif
include $(LMIBASE)/bbb/make/bbb_tools.mk
.PHONY: all clean lib_all
all: $(OBJDIR) $(EXTRA_ALL) $(LIBALL) $(EXE)
clean: $(EXTRA_CLEAN) $(LIBALL_CLEAN)
-$(DEL) $(EXE) $(EXEC)_[ahp] *.map *~ $(EXTRAS)
-$(RMDIR) .obj
lib_all_clean:
@for dir in $(LIBDIRS); do $(MAKE) --no-print-directory -C $$dir clean; done
lib_all:
@for dir in $(LIBDIRS); do $(MAKE) --no-print-directory -C $$dir all; done
$(EXE): $(OBJS) $(LINKER_SCRIPT) $(EXTRA_LIBS)
$(LD) $(OBJS) $(LDFLAGS) -o $@
$(OBJDIR):
echo $(OBJDIR)
$(MKDIR) $(OBJDIR)
-include $(OBJS:.o=.d)
ARCH=$(addsuffix .a, $(addprefix lib, $(notdir $(CURDIR))))
include $(LMIBASE)/bbb/make/bbb_tools.mk
.PHONY: all clean
OBJS=$(addprefix $(OBJDIR)/, $(ASRC:.S=.o) $(SRCS:.c=.o))
all: $(OBJDIR)/ $(EXTRA_ALL) $(ARCH)
clean: $(EXTRA_CLEAN)
rm -Rf $(ARCH) *~ $(EXTRAS)
rm -Rf .obj
$(ARCH): $(OBJS)
$(AR) cr $@ $(OBJS)
$(OBJDIR)/:
mkdir -p $(OBJDIR)
-include $(OBJS:.o=.d)
OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
OUTPUT_ARCH(arm)
ENTRY(_start)
/* The memory map */
MEMORY {
DDR0 : o = 0x20000000, l = 0x00100000 /* 1MB external DDR Bank 0 */
}
SECTIONS
{
.text :
{
_base_args = . ;
. = . + 0x1000;
*(.text_startup)
*(.text*)
} > DDR0
.rodata :
{
. = ALIGN(0x100);
*(.rodata*)
} >DDR0
.data :
{
. = ALIGN(0x100);
*(.data*)
} >DDR0
. = ALIGN(0x100);
__exidx_start = .;
.ARM.exidx :
{
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
} > DDR0
__exidx_end = .;
.bss :
{
. = ALIGN (0x100);
__bss_start__ = . ;
*(.bss*)
*(COMMON)
. = ALIGN (0x100);
__bss_end__ = .;
} >DDR0
_end = ALIGN(0x100);
_stack_bottom = ORIGIN(DDR0) + LENGTH(DDR0) - 0x00008000;
__c_stack_top__ = ORIGIN(DDR0) + LENGTH(DDR0) - 0x100;
}
ifeq ($(OS),Windows_NT)
DIRSEP=\\
LIBGCCPATH="c:/program files (x86)/gnu tools arm embedded/7 2018-q2-update/bin/../lib/gcc/arm-none-eabi/7.3.1"
else
DIRSEP=/
LIBGCCPATH=$(dir $(shell $(CC) -print-libgcc-file-name))
endif
ifeq ($(TARGET),HOST)
CC=gcc
LD=gcc
CFLAGS+=-Wall -Wextra -g -c -O0 -MD -std=gnu11
CFLAGS+=$(EXTRA_CFLAGS)
OBJDIR=.obj$(DIRSEP)host
EXE=$(EXEC)_h
else
TOOLCHAIN=arm-none-eabi-
CC=$(TOOLCHAIN)gcc
AS=$(TOOLCHAIN)as
LD=$(TOOLCHAIN)ld
AR=$(TOOLCHAIN)ar
UFLAGS+=-mlittle-endian -funsigned-char -mno-unaligned-access
UFLAGS+=-mcpu=cortex-a8 -mtune=cortex-a8 -msoft-float
LFLAGS+=-I$(LMIBASE)/bbb/source
LFLAGS+=$(addprefix -I./, $(EXTRADIRS)) $(addprefix -I./, $(LIBDIRS))
CFLAGS+=-Wall -Wextra -g -c -O1 -MD -std=gnu99
CFLAGS+=$(EXTRA_CFLAGS) $(LFLAGS) $(UFLAGS)
AFLAGS+=-mcpu=cortex-a8 -g
CPPFLAGS+= -Wall -Wextra -g -c -O0 -MD $(LFLAGS) $(UFLAGS)
CPPFLAGS+=-fno-rtti
#CPPFLAGS+=-fno-threadsafe-statics
CPPFLAGS+=-fno-exceptions -fnothrow-opt
CPPFLAGS+=-std=gnu++14
LDFLAGS+=--start-group $(addprefix -l, $(LIBDIRS)) -lbbb -lc -lgcc -lm -lstdc++ --end-group
LDFLAGS+= $(addprefix -L./, $(LIBDIRS))
LDFLAGS+=-L$(LMIBASE)/bbb/source
LDFLAGS+=--gc-sections --no-eh-frame-hdr
libgcc=$(shell $(CC) -print-libgcc-file-name)
libgcc-dir= $(shell dirname $(realpath "$(ligbcc)"))
LDFLAGS+=-L$(LIBGCCPATH)
LDFLAGS+=-L"$(shell $(CC) -print-sysroot)"/lib
ifeq ($(PROCESS),)
EXE=$(EXEC)_a
LDFLAGS+=-T $(LMIBASE)/bbb/make/bbb.lds -Map=$(EXE).map
else
EXE=$(EXEC)_p
LDFLAGS+=-T $(LMIBASE)/bbb/make/bbb_process.lds -Map $(EXE).map
endif
OBJDIR=.obj$(DIRSEP)bbb
OBJS+=$(addprefix $(OBJDIR)/, $(ASRC:.S=.o) $(SRCS:.c=.o) $(SCPP:.cpp=.o))
EXTRA_LIBS+=$(foreach dir,$(LIBDIRS), $(addprefix $(dir)/, $(addsuffix .a, $(addprefix lib, $(dir)))))
endif
export CFLAGS
export AFLAGS
export CC
export AS
export AR
export OBJDIR
$(OBJDIR)/%.o: %.c
$(CC) $(CFLAGS) $< -o $@
$(OBJDIR)/%.o: %.cpp
$(CC) $< $(CPPFLAGS) -o $@
$(OBJDIR)/%.o: %.S
$(CC) $(CFLAGS) $< -o $@
$(OBJDIR)/%.o: %.s
$(CC) $(CFLAGS) $< -o $@
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment