Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added for support 491x and 51xx boards #12

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 76 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,21 @@ LIBS_McciBootloader_4801 := \

LDSCRIPT_McciBootloader_4801 := $(BOOTLOADER_LDSCRIPT_ABZ)

##############################################################################
#
# The 491x bootloader
#
##############################################################################

BOOTLOADERS += McciBootloader_491x

LIBS_McciBootloader_491x := \
${BOOTLOADER_LIBS_ABZ} \
${T_OBJDIR}/libmcci_bootloader_catena491x.a \
### end LIBS_McciBootloader_491x

LDSCRIPT_McciBootloader_491x := $(BOOTLOADER_LDSCRIPT_ABZ)

##############################################################################
#
# The 46xx bootloader
Expand All @@ -97,6 +112,21 @@ LIBS_McciBootloader_46xx := \

LDSCRIPT_McciBootloader_46xx := $(BOOTLOADER_LDSCRIPT_ABZ)

##############################################################################
#
# The 51xx bootloader
#
##############################################################################

BOOTLOADERS += McciBootloader_51xx

LIBS_McciBootloader_51xx := \
${BOOTLOADER_LIBS_ABZ} \
${T_OBJDIR}/libmcci_bootloader_catena51xx.a \
### end LIBS_McciBootloader_51xx

LDSCRIPT_McciBootloader_51xx := $(BOOTLOADER_LDSCRIPT_ABZ)

##############################################################################
#
# The cm0plus library
Expand Down Expand Up @@ -215,6 +245,29 @@ SOURCES_libmcci_bootloader_catena4801 := \
$_/src/mccibootloaderboard_catena4801_storageinit.c \
# end SOURCES_libmcci_bootloader_catena4801

##############################################################################
#
# The catena491x library
#
##############################################################################

LIBRARIES += libmcci_bootloader_catena491x

_ := platform/board/mcci/catena491x

CFLAGS_OPT_libmcci_bootloader_catena491x += -Os

INCLUDES_libmcci_bootloader_catena491x := \
$(INCLUDES_libmcci_bootloader_catena_abz) \
platform/driver/flash_mx25v8035f/i \
$_/i \
# end INCLUDES_libmcci_bootloader_catena491x

SOURCES_libmcci_bootloader_catena491x := \
$_/src/mccibootloaderboard_catena491x_platforminterface.c \
$_/src/mccibootloaderboard_catena491x_storageinit.c \
# end SOURCES_libmcci_bootloader_catena491x

##############################################################################
#
# The catena46xx library
Expand All @@ -238,6 +291,29 @@ SOURCES_libmcci_bootloader_catena46xx := \
$_/src/mccibootloaderboard_catena46xx_storageinit.c \
# end SOURCES_libmcci_bootloader_catena46xx

##############################################################################
#
# The catena51xx library
#
##############################################################################

LIBRARIES += libmcci_bootloader_catena51xx

_ := platform/board/mcci/catena51xx

CFLAGS_OPT_libmcci_bootloader_catena51xx += -Os

INCLUDES_libmcci_bootloader_catena51xx := \
$(INCLUDES_libmcci_bootloader_catena_abz) \
platform/driver/flash_mx25v8035f/i \
$_/i \
# end INCLUDES_libmcci_bootloader_catena51xx

SOURCES_libmcci_bootloader_catena51xx := \
$_/src/mccibootloaderboard_catena51xx_platforminterface.c \
$_/src/mccibootloaderboard_catena51xx_storageinit.c \
# end SOURCES_libmcci_bootloader_catena51xx

##############################################################################
#
# mcci_tweetnacl
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*

Module: mcci_bootloader_board_catena51xx.h

Function:
Definitions for bootloader on MCCI Catena 51xx.

Copyright and License:
This file copyright (C) 2023 by

MCCI Corporation
3520 Krums Corners Road
Ithaca, NY 14850

See accompanying LICENSE file for copyright and license information.

Author:
Dhinesh Kumar Pitchai, MCCI Corporation October 2023

*/

#ifndef _mcci_bootloader_board_catena51xx_h_
#define _mcci_bootloader_board_catena51xx_h_ /* prevent multiple includes */

#pragma once

#include "mcci_bootloader_platform.h"
#include "mcci_bootloader_board_catena_abz.h"

MCCI_BOOTLOADER_BEGIN_DECLS

McciBootloaderPlatform_StorageInitFn_t
McciBootloaderBoard_Catena51xx_storageInit;

MCCI_BOOTLOADER_END_DECLS

#endif /* _mcci_bootloader_board_catena51xx_h_ */
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
/*

Module: mccibootloaderboard_catena51xx_platforminterface.c

Function:
gk_McciBootloaderPlatformInterface for MCCI Catena 51xx boards.

Copyright and License:
This file copyright (C) 2023 by

MCCI Corporation
3520 Krums Corners Road
Ithaca, NY 14850

See accompanying LICENSE file for copyright and license information.

Author:
Dhinesh Kumar Pitchai, MCCI Corporation October 2023

*/

#include "mcci_bootloader_board_catena51xx.h"

#include "mcci_bootloader_flash_mx25v8035f.h"

/****************************************************************************\
|
| Manifest constants & typedefs.
|
\****************************************************************************/



/****************************************************************************\
|
| Read-only data.
|
\****************************************************************************/

const McciBootloaderPlatform_Interface_t
gk_McciBootloaderPlatformInterface =
{
.pSystemInit = McciBootloaderBoard_CatenaAbz_systemInit,
.pPrepareForLaunch = McciBootloaderBoard_CatenaAbz_prepareForLaunch,
.pFail = McciBootloaderBoard_CatenaAbz_fail,
.pDelayMs = McciBootloaderBoard_CatenaAbz_delayMs,
.pGetUpdate = McciBootloaderBoard_CatenaAbz_getUpdate,
.pSetUpdate = McciBootloaderBoard_CatenaAbz_setUpdate,
.pSystemFlashErase = McciBootloader_Stm32L0_systemFlashErase,
.pSystemFlashWrite = McciBootloader_Stm32L0_systemFlashWrite,
.Storage =
{
.pInit = McciBootloaderBoard_Catena51xx_storageInit,
.pRead = McciBootloaderFlash_Mx25v8035f_storageRead,
.pGetPrimaryAddress = McciBootloaderBoard_CatenaAbz_getPrimaryStorageAddress,
.pGetFallbackAddress = McciBootloaderBoard_CatenaAbz_getFallbackStorageAddress,
},
.Spi =
{
.pInit = McciBootloaderBoard_CatenaAbz_spiInit,
.pTransfer = McciBootloaderBoard_CatenaAbz_spiTransfer,
},
.Annunciator =
{
.pInit = McciBootloaderBoard_CatenaAbz_annunciatorInit,
.pIndicateState = McciBootloaderBoard_CatenaAbz_annunciatorIndicateState,
},
};

/****************************************************************************\
|
| Variables.
|
\****************************************************************************/



/**** end of mccibootloaderboard_catenaabz_platforminterface.c ****/
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
/*

Module: mccibootloaderboard_catena51xx_storageinit.c

Function:
McciBootloaderBoard_Catena51xx_storageInit()

Copyright and License:
This file copyright (C) 2023 by

MCCI Corporation
3520 Krums Corners Road
Ithaca, NY 14850

See accompanying LICENSE file for copyright and license information.

Author:
Dhinesh Kumar Pitchai, MCCI Corporation October 2023

*/

#include "mcci_bootloader_board_catena51xx.h"

#include "mcci_bootloader_flash_mx25v8035f.h"

/****************************************************************************\
|
| Manifest constants & typedefs.
|
\****************************************************************************/



/****************************************************************************\
|
| Read-only data.
|
\****************************************************************************/



/****************************************************************************\
|
| Variables.
|
\****************************************************************************/


/*

Name: McciBootloaderBoard_Catena51xx_storageInit()

Function:
Initialize the Catena51xx external storage.

Definition:
typedef McciBootloaderPlatform_StorageInit_t
McciBootloaderBoard_Catena51xx_storageInit;

void McciBootloaderBoard_Catena51xx_storageInit(
void
);

Description:
Initialize SPI, init the external flash, and we're ready.

Returns:
No explicit result.

Notes:


*/

void
McciBootloaderBoard_Catena51xx_storageInit(
void
)
{
McciBootloaderPlatform_spiInit();
McciBootloaderFlash_Mx25v8035f_storageInit();
}


/**** end of mccibootloaderboard_catena51xx_storageinit.c ****/
37 changes: 37 additions & 0 deletions platform/board/mcci/model491x/i/mcci_bootloader_board_model491x.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*

Module: mcci_bootloader_board_model491x.h

Function:
Definitions for bootloader on MCCI Catena 491x boards.

Copyright and License:
This file copyright (C) 2023 by

MCCI Corporation
3520 Krums Corners Road
Ithaca, NY 14850

See accompanying LICENSE file for copyright and license information.

Author:
Dhinesh Kumar Pitchai, MCCI Corporation September 2023

*/

#ifndef _mcci_bootloader_board_model491x_h_
#define _mcci_bootloader_board_model491x_h_ /* prevent multiple includes */

#pragma once

#include "mcci_bootloader_platform.h"
#include "mcci_bootloader_board_catena_abz.h"

MCCI_BOOTLOADER_BEGIN_DECLS

McciBootloaderPlatform_StorageInitFn_t
McciBootloaderBoard_Model491x_storageInit;

MCCI_BOOTLOADER_END_DECLS

#endif /* _mcci_bootloader_board_model491x_h_ */
Loading