Unrelated to the issue of hard-coding MCUs, this one needs attention from
Red Hat:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63901

The short version is newlib gets built with support only for a default
-mhwmult=16 which causes the MCU to reset when invoking strtoul in an
application targeting -mhwmult=f5series, because there is no MPY peripheral
at the addresses where the operands are written.  mhwmult needs to be one
of the features that distinguish multilib selection.

It'd also probably be better to make the default in msp430_output_labelref
select msp430_no_hwmult which will (at least theoretically) work on every
MCU.

Confirmed present in today's trunk revisions of gcc, binutils, and newlib
using the build script at:
https://github.com/pabigot/bsp430/blob/master/maintainer/msp430-elf-build

I'm working around it by defaulting gcc to select f5series since those are
the MCUs I'm developing with this week.

Peter

>From d6a368e5ca6cfbf7c99be1df07770779da2a5dc4 Mon Sep 17 00:00:00 2001
From: "Peter A. Bigot" <p...@pabigot.com>
Date: Sat, 15 Nov 2014 21:11:12 -0600
Subject: [PATCH] HACK: msp430 use -mhwmult=auto select f5_series

Work around https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63901
---
 gcc/config/msp430/msp430.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/config/msp430/msp430.c b/gcc/config/msp430/msp430.c
index fe97f27..e4d20b2 100644
--- a/gcc/config/msp430/msp430.c
+++ b/gcc/config/msp430/msp430.c
@@ -2173,7 +2173,7 @@ msp430_use_f5_series_hwmult (void)
   static const char * cached_match = NULL;
   static bool         cached_result;

-  if (msp430_hwmult_type == F5SERIES)
+  if ((msp430_hwmult_type == F5SERIES) || (msp430_hwmult_type == AUTO))
     return true;

   if (target_mcu == NULL || msp430_hwmult_type != AUTO)
-- 
1.8.5.5
------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
Mspgcc-users mailing list
Mspgcc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mspgcc-users

Reply via email to