Skip to content

Commit

Permalink
make different module tables for boards, avoid mem error in devboard
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertK66 committed Dec 12, 2023
1 parent 95c5918 commit 6bac044
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
15 changes: 13 additions & 2 deletions ClimbObc/src/ClimbObc.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ void init_mainlooptimer(LPC_TIMER_T* pTimer, CHIP_SYSCTL_CLOCK_T timBitIdx);
// SRS connected to Side Panel A (X+)
static const srs_initdata_t SrsInit = {
LPC_I2C2, // I2C bus to use
0x20 // SRS slave address.
};

static const mem_init_t MemoryInit = {
Expand Down Expand Up @@ -121,11 +120,12 @@ static const gps_initdata_t GpsInit = {

static init_report_t InitReport;

#if BA_BOARD == BA_CLIMBOBC
static const MODULE_DEF_T Modules[] = {
MOD_INIT( deb_init, deb_main, LPC_UART2),
MOD_INIT( timInit, timMain, &InitReport ),
MOD_INIT( hwc_init, hwc_main, &ObcPins ),
MOD_INIT( MramInitAll, MramMain, &Chips),
// MOD_INIT( MramInitAll, MramMain, &Chips),
// MOD_INIT( SdcInitAll, SdcMain, &Cards),
// MOD_INIT( sen_init, sen_main, NULL),
// MOD_INIT( memInit, memMain, &MemoryInit),
Expand All @@ -136,6 +136,17 @@ static const MODULE_DEF_T Modules[] = {
// MOD_INIT( psu_init, psu_main, NULL)
MOD_INIT( srs_init, srs_main, &SrsInit)
};
#else
static const MODULE_DEF_T Modules[] = {
MOD_INIT( deb_init, deb_main, LPC_UART2),
MOD_INIT( timInit, timMain, &InitReport ),
MOD_INIT( hwc_init, hwc_main, &ObcPins ),
MOD_INIT( gpsInit, gpsMain, &GpsInit),
MOD_INIT( app_init, app_main, NULL),
MOD_INIT( srs_init, srs_main, &SrsInit)
};
#endif

#define MODULE_CNT (sizeof(Modules)/sizeof(MODULE_DEF_T))

// Main variables
Expand Down
2 changes: 1 addition & 1 deletion ClimbObc/src/ClimbObc.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#include "build.h"
#ifndef BA_BOARD
#define BA_BOARD BA_CLIMBOBC // BA_CLIMBOBC //BA_OM13085 // BA_OM13085_EM2T
#define BA_BOARD BA_OM13085 // BA_CLIMBOBC //BA_OM13085 // BA_OM13085_EM2T
#endif

#if BA_BOARD == BA_OM13085
Expand Down

0 comments on commit 6bac044

Please sign in to comment.