Skip to content

Commit

Permalink
Add PlatformCapabilities and TargetCapabilities
Browse files Browse the repository at this point in the history
  • Loading branch information
MateuszKlatecki committed Jul 30, 2019
1 parent e6cc2b6 commit 5d91739
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
14 changes: 14 additions & 0 deletions targets/FreeRTOS/GC5/common/targetHAL.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "stdbool.h"
#include "cmsis_gcc.h"
#include <nanoWeak.h>
#include <platform_target_capabilities.h>

void HAL_AssertEx()
{
Expand Down Expand Up @@ -36,3 +37,16 @@ bool Target_HasNanoBooter()
{
return true;
};

// declarations of platform capabilities
uint32_t GetPlatformCapabilities()
{
return 0;
};

// declarations of target capabilities
// If a target has something to declare it has to provide a 'strong' implementation of this.
__nfweak uint32_t GetTargetCapabilities()
{
return TargetCapabilities_JtagUpdate;
};
25 changes: 25 additions & 0 deletions targets/FreeRTOS/GC5/include/platform_target_capabilities.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
//
// Copyright (c) 2019 The nanoFramework project contributors
// See LICENSE file in the project root for full license information.
//

#ifndef _PLATFORM_TARGET_CAPABILITIES_H_
#define _PLATFORM_TARGET_CAPABILITIES_H_ 1

///////////////////////////////////////////////////////////////////////////////////////////////////////
// !!! KEEP IN SYNC WITH nanoFramework.Tools.Debugger.Esp32.TargetCapabilities (in managed code) !!! //
///////////////////////////////////////////////////////////////////////////////////////////////////////

#ifdef __cplusplus
extern "C" {
#endif

// this platform doesn't have any declared capabilities

// the targets of this platform don't have any declared capabilities

#ifdef __cplusplus
}
#endif

#endif //_PLATFORM_TARGET_CAPABILITIES_H_

0 comments on commit 5d91739

Please sign in to comment.