blob: af29b6169c192833a87c3dd3d9f3655a3cb01096 [file] [log] [blame]
%%{
/* --COPYRIGHT--,ESD
* Copyright (c) 2008 Texas Instruments. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 and Eclipse Distribution License
* v. 1.0 which accompanies this distribution. The Eclipse Public License is
* available at http://www.eclipse.org/legal/epl-v10.html and the Eclipse
* Distribution License is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
*
* Contributors:
* Texas Instruments - initial implementation
* --/COPYRIGHT--*/
/*
* ======== Reset.xdt ========
*/
var Startup = xdc.module('xdc.runtime.Startup');
var Reset = xdc.module('xdc.runtime.Reset');
var cnames = [];
if (Startup.resetFxn != null) {
cnames.push(Startup.resetFxn.$name.replace(/\./g, '_'));
}
for (var i = 0; i < Reset.fxns.length; i++) {
var fxn = Reset.fxns[i];
if (fxn != null) {
cnames.push(fxn.$name.replace(/\./g, '_'));
}
}
%%}
/*
* Startup_reset__I is an internal entry point called by target/platform
* boot code. Boot code is not brought into a partial-link assembly. So,
* without this pragma, whole program optimizers would otherwise optimize-out
* this function.
*/
#ifdef __ti__
#pragma FUNC_EXT_CALLED(xdc_runtime_Startup_reset__I);
#endif
#ifdef __GNUC__
#if __GNUC__ >= 4
xdc_Void xdc_runtime_Startup_reset__I(void) __attribute__ ((externally_visible));
#endif
#endif
%for (var i = 0; i < cnames.length; i++) {
extern xdc_Void `cnames[i]`(void); /* user defined reset function */
%}
/*
* ======== xdc_runtime_Startup_reset__I ========
* This function is called by bootstrap initialization code as early as
* possible in the startup process. This function calls all functions in
* the Reset.fxns array _as well as_ Startup.resetFxn (if it's non-NULL)
*/
xdc_Void xdc_runtime_Startup_reset__I(void)
{
%for (var i = 0; i < cnames.length; i++) {
`cnames[i]`();
%}
}