From d0ffd9510f43243c109de4d07fb83cd744d4f67c Mon Sep 17 00:00:00 2001 From: Chun-Chieh Li Date: Mon, 8 Jul 2019 15:55:50 +0800 Subject: [PATCH] [M252KG] Override mpu-rom-end to 0x1fffffff MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Without this override, mpu hal will require 5 mpu regions which exceed 4 mpu regions supported by M252 (see hal/mpu/mbed_mpu_v8m.c). In this scenario, we will hit assert error but we actually meet stack overrun first due to just 0x400 bytes for emitting error message. The issue doesn’t occur on other targets such as M487 because it has 8 mpu regions. --- targets/targets.json | 1 + 1 file changed, 1 insertion(+) diff --git a/targets/targets.json b/targets/targets.json index f84233c4e6..16de56110a 100644 --- a/targets/targets.json +++ b/targets/targets.json @@ -8818,6 +8818,7 @@ } }, "overrides": { + "mpu-rom-end": "0x1fffffff", "tickless-from-us-ticker": true }, "inherits": ["Target"],