平台编译增加GCC,编译链接通过,外部编译未通过
This commit is contained in:
parent
9cc1e8bf3d
commit
4b7464fe39
|
@ -66,6 +66,7 @@ void Thread::OnSchedule()
|
|||
__set_MSP(__get_MSP() & 0xFFFFFFF8);
|
||||
}
|
||||
|
||||
#if defined(__CC_ARM)
|
||||
extern "C"
|
||||
{
|
||||
extern uint** curStack; // 当前线程栈的指针。需要保存线程栈,所以需要指针
|
||||
|
@ -163,6 +164,7 @@ PendSV_NoSave // 此时整个上下文已经被保存
|
|||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
// 切换线程,马上切换时间片给下一个线程
|
||||
bool Thread::CheckPend()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "ADC.h"
|
||||
#include "Device\ADC.h"
|
||||
|
||||
#include "Platform\stm32.h"
|
||||
|
||||
|
|
|
@ -27,9 +27,6 @@ namespace NewLife.Reflection
|
|||
build.AddIncludes("..\\..\\..\\Lib\\Inc");
|
||||
build.AddIncludes("..\\", false);
|
||||
build.AddIncludes("..\\..\\", false);
|
||||
build.AddIncludes("..\\..\\Core");
|
||||
build.AddIncludes("..\\..\\Kernel");
|
||||
build.AddIncludes("..\\..\\Device");
|
||||
build.AddFiles(".", "*.c;*.cpp;*.s");
|
||||
build.AddFiles("..\\CortexM", "*.c;*.cpp;*.s");
|
||||
build.Libs.Clear();
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Diagnostics;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.Win32;
|
||||
using NewLife.Log;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading;
|
||||
using System.Xml;
|
||||
using NewLife.Web;
|
||||
|
||||
namespace NewLife.Reflection
|
||||
{
|
||||
public class ScriptEngine
|
||||
{
|
||||
static void Main()
|
||||
{
|
||||
var build = Builder.Create("GCC");
|
||||
build.Init();
|
||||
build.Cortex = 3;
|
||||
build.Defines.Add("STM32F1");
|
||||
build.AddIncludes("..\\..\\..\\Lib\\CMSIS");
|
||||
build.AddIncludes("..\\..\\..\\Lib\\Inc");
|
||||
build.AddIncludes("..\\", false);
|
||||
build.AddIncludes("..\\..\\", false);
|
||||
build.AddFiles(".", "*.c;*.cpp;*.s");
|
||||
build.AddFiles("..\\CortexM", "*.c;*.cpp;*.s");
|
||||
build.Libs.Clear();
|
||||
build.CompileAll();
|
||||
build.BuildLib("..\\..\\SmartOS_F1");
|
||||
|
||||
build.Debug = true;
|
||||
build.CompileAll();
|
||||
build.BuildLib("..\\..\\SmartOS_F1");
|
||||
|
||||
/*build.Tiny = true;
|
||||
build.CompileAll();
|
||||
build.BuildLib("..\\");*/
|
||||
}
|
||||
}
|
||||
}
|
|
@ -2,7 +2,7 @@
|
|||
#include "Kernel\Interrupt.h"
|
||||
#include "Device\Port.h"
|
||||
|
||||
#include "Can.h"
|
||||
#include "Device\Can.h"
|
||||
|
||||
#include "Platform\stm32.h"
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "Device\Port.h"
|
||||
#include "DAC.h"
|
||||
#include "Device\DAC.h"
|
||||
|
||||
#include "Platform\stm32.h"
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "Sys.h"
|
||||
#include "DMA.h"
|
||||
#include "Device\DMA.h"
|
||||
|
||||
#include "Platform\stm32.h"
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "Sys.h"
|
||||
#include "I2C.h"
|
||||
#include "Device\I2C.h"
|
||||
|
||||
#include "Platform\stm32.h"
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "Sys.h"
|
||||
|
||||
#include "Interrupt.h"
|
||||
#include "Kernel\Interrupt.h"
|
||||
//#include "SerialPort.h"
|
||||
|
||||
#include "..\stm32.h"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "RTC.h"
|
||||
#include "Device\RTC.h"
|
||||
#include "Kernel\TTime.h"
|
||||
#include "Kernel\Interrupt.h"
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include "Buffer.h"
|
||||
#include "Sys.h"
|
||||
#include "Sys.h"
|
||||
|
||||
#include "Device\Spi.h"
|
||||
|
||||
|
|
Loading…
Reference in New Issue