Skip to content

Commit

Permalink
bootloader: Add boot console log
Browse files Browse the repository at this point in the history
This commit adds a boot console log. However, since using LOG BACKEND
increases the memory size significantly, printk is used instead.

Signed-off-by: Takuya Sasaki <takuya.sasaki@spacecubics.com>
  • Loading branch information
sasataku committed Jul 24, 2024
1 parent 3d066a1 commit 325e0cb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bootloader/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <string.h>
#include <zephyr/kernel.h>
#include <zephyr/storage/flash_map.h>
#include "version.h"

#define SCOBCA1_FPGA_SYSREG_CODEMSEL (0x4F000000)
#define SCOBCA1_FPGA_HRMEM_ADDR (0x60000000)
Expand Down Expand Up @@ -51,6 +52,8 @@ int main(void)
{
int ret;

printk("Start SC-Sat1 Boot loader (v%s)\n", BOOT_LOADER_VERSION);

ret = copy_norflash_to_hrmem(FIXED_PARTITION_ID(fsw_partition), SCOBCA1_FPGA_HRMEM_ADDR,
KB(CONFIG_SCOBC_A1_BOOT_CFG_COPY_SIZE_KB));
if (ret < 0) {
Expand Down
9 changes: 9 additions & 0 deletions bootloader/src/version.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/*
* Copyright (c) 2024 Space Cubics, LLC.
*
* SPDX-License-Identifier: Apache-2.0
*/

#pragma once

#define BOOT_LOADER_VERSION "0.2.0"

0 comments on commit 325e0cb

Please sign in to comment.