Skip to content

Commit

Permalink
Merge pull request #10 from sifive/dev_fix
Browse files Browse the repository at this point in the history
extract MTIME_CTRL_ADDR from platform.h
  • Loading branch information
phmoussay authored Jul 27, 2020
2 parents d30909b + 5323d71 commit 29abc54
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion templates/Bridge_Freedom-metal_FreeRTOS.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,19 @@
#ifndef BRIDGE_FREEDOM_METAL_FREERTOS_H
#define BRIDGE_FREEDOM_METAL_FREERTOS_H

#include <metal/machine/platform.h>

#if defined(METAL_RISCV_CLINT0)
#define MTIME_CTRL_ADDR METAL_RISCV_CLINT0_0_BASE_ADDRESS
#elif defined(METAL_SIFIVE_CLIC0)
#define MTIME_CTRL_ADDR METAL_SIFIVE_CLIC0_0_BASE_ADDRESS
{% if config.freeRTOS.define.MTIME_CTRL_ADDR is defined %}
#else
#define MTIME_CTRL_ADDR {{config.freeRTOS.define.MTIME_CTRL_ADDR}}
{% endif %}
#endif

#define MTIME_RATE_HZ {{config.freeRTOS.define.MTIME_RATE_HZ}}
#define MTIME_CTRL_ADDR {{config.freeRTOS.define.MTIME_CTRL_ADDR}}

#define portHANDLE_INTERRUPT {{config.freeRTOS.define.portHANDLE_INTERRUPT}}
#define portHANDLE_EXCEPTION {{config.freeRTOS.define.portHANDLE_EXCEPTION}}
Expand Down

0 comments on commit 29abc54

Please sign in to comment.