&ds390_port,
#endif
#if !OPT_DISABLE_PIC
- &pic14_port,
+ &pic_port,
#endif
#if !OPT_DISABLE_I186
&i186_port,
/**
remove me - TSD a hack to force sdcc to generate gpasm format .asm files.
*/
-extern void pic14glue ();
+extern void picglue ();
/** Sets the port to the one given by the command line option.
@param The name minus the option (eg 'mcs51')
@return 0 on success.
*/
-static int
+static void
_setPort (const char *name)
{
int i;
if (!strcmp (_ports[i]->target, name))
{
port = _ports[i];
- return 0;
+ return;
}
}
/* Error - didnt find */
"SDCC : ");
for (i = 0; i < NUM_PORTS; i++)
fprintf (stderr, "%s%s", i == 0 ? "" : "/", _ports[i]->target);
+
fprintf (stderr, " %s"
#ifdef SDCC_SUB_VERSION_STR
"/" SDCC_SUB_VERSION_STR
#endif
- " ` "
#ifdef __CYGWIN32__
" (CYGWIN32)\n"
#else
case 'm':
/* Used to select the port */
- if (_setPort (argv[i] + 2))
- {
- werror (W_UNSUPP_OPTION, "-m", "Unrecognised processor");
- }
+ _setPort (argv[i] + 2);
break;
case 'a':
/* standard library path */
if (!options.nostdlib)
{
- if (IS_DS390_PORT)
+ if (TARGET_IS_DS390)
{
c = "ds390";
}
/*printVersionInfo (); */
+ if (NUM_PORTS==0) {
+ fprintf (stderr, "Build error: no ports are enabled.\n");
+ exit (1);
+ }
+
_findPort (argc, argv);
/* Initalise the port. */
if (port->init)
if (!fatalError)
{
- if (IS_PIC14_PORT)
+ if (TARGET_IS_PIC) {
/* TSD PIC port hack - if the PIC port option is enabled
and SDCC is used to generate PIC code, then we will
generate .asm files in gpasm's format instead of SDCC's
assembler's format
*/
- pic14glue ();
+ picglue ();
+ }
else
glue ();
if (fatalError)