diff --git a/bsp/src/OPLAYER/bsp.c b/bsp/src/OPLAYER/bsp.c --- a/bsp/src/OPLAYER/bsp.c +++ b/bsp/src/OPLAYER/bsp.c @@ -457,8 +457,8 @@ void bsp_lcd0_writeGRAM(void* buffer,uin void bsp_lcd0_readGRAM(void* buffer,uint32_t count) { -// uint32_t reg =ILI9328_REGISTER_WRITEDATATOGRAM; -// int8_t* pt8 = (int8_t*)(void*)® + uint32_t reg =ILI9328_REGISTER_WRITEDATATOGRAM; + uint8_t* pt8 = (uint8_t*)(void*)® #if __BYTE_ORDER__==__ORDER_BIG_ENDIAN__ *lcd0_CMD=pt8[3]; *lcd0_CMD=pt8[2]; @@ -474,21 +474,31 @@ void bsp_lcd0_readGRAM(void* buffer,uint pt8[2*i]=*lcd0_DATA; } #else -// lcd0_CMD=pt8[1]; -// lcd0_CMD=pt8[0]; -// pt8 = (int8_t*)(void*)buffer; -// for(int i=0;i<(int)count;i++) -// { -// pt8[(2*i) +1]=*lcd0_DATA; -// __asm__("nop"); -// __asm__("nop"); -// __asm__("nop"); -// __asm__("nop"); -// __asm__("nop"); -// pt8[2*i]=*lcd0_DATA; - //pt8[(2*i) +1]=(uint8_t)0; - //pt8[(2*i)]=(uint8_t)0; -// } + *lcd0_CMD=pt8[1]; + *lcd0_CMD=pt8[0]; + pt8 = (uint8_t*)(void*)buffer; + for(int i=0;i<(int)count;i++) + { + pt8[(2*i) +1]=*lcd0_DATA; + __asm__("nop"); + __asm__("nop"); + __asm__("nop"); + __asm__("nop"); + __asm__("nop"); + __asm__("nop"); + __asm__("nop"); + __asm__("nop"); + __asm__("nop"); + __asm__("nop"); + pt8[2*i]=*lcd0_DATA; + __asm__("nop"); + __asm__("nop"); + __asm__("nop"); + __asm__("nop"); + __asm__("nop"); + pt8[(2*i) +1]=(uint8_t)0; + pt8[(2*i)]=(uint8_t)0; + } #endif } diff --git a/examples/SOLAR_PSU_HELLO/bin/dfu.py b/examples/SOLAR_PSU_HELLO/bin/dfu.py deleted file mode 100644 --- a/examples/SOLAR_PSU_HELLO/bin/dfu.py +++ /dev/null @@ -1,121 +0,0 @@ -#!/usr/bin/python - -# Written by Antonio Galea - 2010/11/18 -# Distributed under Gnu LGPL 3.0 -# see http://www.gnu.org/licenses/lgpl-3.0.txt - -import sys,struct,zlib,os -from optparse import OptionParser - -DEFAULT_DEVICE="0x0483:0xdf11" - -def named(tuple,names): - return dict(zip(names.split(),tuple)) -def consume(fmt,data,names): - n = struct.calcsize(fmt) - return named(struct.unpack(fmt,data[:n]),names),data[n:] -def cstring(string): - return string.split('\0',1)[0] -def compute_crc(data): - return 0xFFFFFFFF & -zlib.crc32(data) -1 - -def parse(file,dump_images=False): - print 'File: "%s"' % file - data = open(file,'rb').read() - crc = compute_crc(data[:-4]) - prefix, data = consume('<5sBIB',data,'signature version size targets') - print '%(signature)s v%(version)d, image size: %(size)d, targets: %(targets)d' % prefix - for t in range(prefix['targets']): - tprefix, data = consume('<6sBI255s2I',data,'signature altsetting named name size elements') - tprefix['num'] = t - if tprefix['named']: - tprefix['name'] = cstring(tprefix['name']) - else: - tprefix['name'] = '' - print '%(signature)s %(num)d, alt setting: %(altsetting)s, name: "%(name)s", size: %(size)d, elements: %(elements)d' % tprefix - tsize = tprefix['size'] - target, data = data[:tsize], data[tsize:] - for e in range(tprefix['elements']): - eprefix, target = consume('<2I',target,'address size') - eprefix['num'] = e - print ' %(num)d, address: 0x%(address)08x, size: %(size)d' % eprefix - esize = eprefix['size'] - image, target = target[:esize], target[esize:] - if dump_images: - out = '%s.target%d.image%d.bin' % (file,t,e) - open(out,'wb').write(image) - print ' DUMPED IMAGE TO "%s"' % out - if len(target): - print "target %d: PARSE ERROR" % t - suffix = named(struct.unpack('<4H3sBI',data[:16]),'device product vendor dfu ufd len crc') - print 'usb: %(vendor)04x:%(product)04x, device: 0x%(device)04x, dfu: 0x%(dfu)04x, %(ufd)s, %(len)d, 0x%(crc)08x' % suffix - if crc != suffix['crc']: - print "CRC ERROR: computed crc32 is 0x%08x" % crc - data = data[16:] - if data: - print "PARSE ERROR" - -def build(file,targets,device=DEFAULT_DEVICE): - data = '' - for t,target in enumerate(targets): - tdata = '' - for image in target: - tdata += struct.pack('<2I',image['address'],len(image['data']))+image['data'] - tdata = struct.pack('<6sBI255s2I','Target',0,1,'ST...',len(tdata),len(target)) + tdata - data += tdata - data = struct.pack('<5sBIB','DfuSe',1,len(data)+11,len(targets)) + data - v,d=map(lambda x: int(x,0) & 0xFFFF, device.split(':',1)) - data += struct.pack('<4H3sB',0,d,v,0x011a,'UFD',16) - crc = compute_crc(data) - data += struct.pack('ops->write(__opnfiles__[1],(void*)"hello",1,5); } -int libuc2_main_task() +int libuc_main() { char in[255]; lcd_print(); diff --git a/lib/src/common/FILE_SYSTEM/SDCARD/sdcard_STM32F4.pro b/lib/src/common/FILE_SYSTEM/SDCARD/sdcard_STM32F4.pro --- a/lib/src/common/FILE_SYSTEM/SDCARD/sdcard_STM32F4.pro +++ b/lib/src/common/FILE_SYSTEM/SDCARD/sdcard_STM32F4.pro @@ -15,5 +15,6 @@ target.path = $$[QT_INSTALL_LIBS]/$$UCMO INSTALLS += target HEADERS += \ - ../../../includes/sdcard.h + ../../../includes/sdcard.h \ + ../../../includes/sdcard-spi.h diff --git a/lib/src/common/GRAPHIC/CONTROLERS/ILI9328/ili9328.c b/lib/src/common/GRAPHIC/CONTROLERS/ILI9328/ili9328.c --- a/lib/src/common/GRAPHIC/CONTROLERS/ILI9328/ili9328.c +++ b/lib/src/common/GRAPHIC/CONTROLERS/ILI9328/ili9328.c @@ -359,7 +359,7 @@ void ili9328paintText(LCD_t* LCD,char* b { line=font->table[(((*buffer)-32)*h*bpl)+tableoffset++]; } - tmp[pix]=0; + //tmp[pix]=0; if((line & (uint8_t)0x01)==(uint8_t)1)tmp[pix]=(uint16_t)color; pix++; line>>=1; diff --git a/lib/src/common/GRAPHIC/GUI/Widgets/Terminal/Terminal.c b/lib/src/common/GRAPHIC/GUI/Widgets/Terminal/Terminal.c --- a/lib/src/common/GRAPHIC/GUI/Widgets/Terminal/Terminal.c +++ b/lib/src/common/GRAPHIC/GUI/Widgets/Terminal/Terminal.c @@ -51,7 +51,7 @@ int terminal_init(terminal_t* terminal,L int charw=terminal->font->Width + terminal->horizontalSpace; int charh=terminal->font->Height + terminal->verticalSpace; terminal->textColor=0xFFFF; - terminal->backgroundColor=0x0000; + terminal->backgroundColor=0xF00F; terminal_setgeometry(terminal,5,5,terminal->LCD->width-(10),terminal->LCD->height-(10)); strdev->_stream = (UHANDLE)terminal; strdev->ops = &TERMINAL_OPS; @@ -112,28 +112,20 @@ void terminal_settextColor(terminal_t* t void terminal_movecursor(terminal_t* terminal,int n) { - int charw=terminal->font->Width + terminal->horizontalSpace; - int charh=terminal->font->Height + terminal->verticalSpace; terminal->column += n; if(terminal->column>(terminal->columnCount)) { terminal->line += (terminal->column)/terminal->columnCount; terminal->line = terminal->line % terminal->lineCount; terminal->column = (terminal->column % terminal->columnCount)-1; - int x=CHARXPOS(terminal, charw); - int y=CHARYPOS(terminal,charh)-charh; - int w=charw*(terminal->columnCount-terminal->column); - int h=charh; - //terminal->LCD->paintFilRect(terminal->LCD,CHARXPOS(terminal, charw),CHARYPOS(terminal,charh)-charh,charw*(terminal->columnCount-terminal->column-1),charh,terminal->backgroundColor,0,terminal->backgroundColor); } - //terminal->LCD->paintFilRect(terminal->LCD,CHARXPOS(terminal,charw),CHARYPOS(terminal,charh)-charh,charw,charh,terminal->backgroundColor,0,terminal->backgroundColor); } void terminal_clearCurentLine(terminal_t* terminal) { int charw=terminal->font->Width + terminal->horizontalSpace; int charh=terminal->font->Height + terminal->verticalSpace; -// terminal->LCD->paintFilRect(terminal->LCD,terminal->Xpos,CHARYPOS(terminal, charh)-charh,terminal->width,charh,terminal->backgroundColor,0,terminal->backgroundColor); + terminal->LCD->paintFilRect(terminal->LCD,terminal->Xpos,CHARYPOS(terminal, charh)-charh,terminal->width,charh,terminal->backgroundColor,0,terminal->backgroundColor); } int terminal_writenc(terminal_t* terminal,char* data, int n) @@ -162,7 +154,7 @@ int terminal_writenc(terminal_t* termina if(terminal->column==0)terminal_clearCurentLine(terminal); if(buffer[0]!='\r'){ // terminal->LCD->paintFilRect(terminal->LCD,CHARXPOS(terminal,charw),CHARYPOS(terminal, charh)-charh,charw,charh,terminal->backgroundColor,0,terminal->backgroundColor); - terminal->LCD->paintText(terminal->LCD,buffer,CHARXPOS(terminal,charw),CHARYPOS(terminal, charh),terminal->font,terminal->textColor); + terminal->LCD->paintText(terminal->LCD,buffer,CHARXPOS(terminal,charw),(CHARYPOS(terminal, charh))-(terminal->verticalSpace/2),terminal->font,terminal->textColor); terminal_movecursor(terminal,1); } } diff --git a/lib/src/includes/sdcard-spi.h b/lib/src/includes/sdcard-spi.h --- a/lib/src/includes/sdcard-spi.h +++ b/lib/src/includes/sdcard-spi.h @@ -19,8 +19,8 @@ -- Author : Alexis Jeandet -- Mail : alexis.jeandet@gmail.com -------------------------------------------------------------------------------*/ -#ifndef SDCARD-SPI_H -#define SDCARD-SPI_H +#ifndef SDCARD_SPI_H +#define SDCARD_SPI_H #include #include #include diff --git a/lib/src/simulator/CPU/startup.c b/lib/src/simulator/CPU/startup.c --- a/lib/src/simulator/CPU/startup.c +++ b/lib/src/simulator/CPU/startup.c @@ -3,5 +3,5 @@ int main(void) { bsp_init(); - libuc2_main_task(); + libuc_main(); } diff --git a/mkspecs/features/cpu.prf b/mkspecs/features/cpu.prf deleted file mode 100644 --- a/mkspecs/features/cpu.prf +++ /dev/null @@ -1,14 +0,0 @@ -!isEmpty( UCMODEL ) { - include(./$$UCMODEL/cpu.pri) -} - - - - - - - - - - - diff --git a/mkspecs/features/simulator/optimised_math.h b/mkspecs/features/simulator/optimised_math.h new file mode 100644 --- /dev/null +++ b/mkspecs/features/simulator/optimised_math.h @@ -0,0 +1,37 @@ +/*------------------------------------------------------------------------------ +-- This file is a part of the libuc, microcontroler library +-- Copyright (C) 2012, Alexis Jeandet +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation; either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +------------------------------------------------------------------------------- +-- Author : Alexis Jeandet +-- Mail : alexis.jeandet@gmail.com +-------------------------------------------------------------------------------*/ +#ifndef OPTIMISED_MATH_H +#define OPTIMISED_MATH_H +#include + +inline float32_t optimised_sqrt(float32_t value) +{ + float32_t out; + arm_sqrt_f32(value,&out); + return out; +} + +inline float optimised_sin(float32_t x) +{ + return arm_sin_f32(x); +} +#endif diff --git a/mkspecs/features/simulator/qmake.conf b/mkspecs/features/simulator/qmake.conf new file mode 100644 --- /dev/null +++ b/mkspecs/features/simulator/qmake.conf @@ -0,0 +1,57 @@ +# +# qmake configuration for stm32f4 +# +# + + +isEmpty(_simulator_conf){ +_simulator_conf="oneshot" + +QMAKE_CFLAGS= -std=c99 + +include(../../common/simulator.conf) + +DEFINES += \"assert_param(expr)=((void)0)\" +INCLUDEPATH += $$PWD /usr/include/SDL + +DEFINES += BSP="\"\\\"$$BSP"\\\"\" + +CONFIG += cpu + +contains( TEMPLATE, app ) { + OBJECTS_DIR=obj-$$UCMODEL + DESTDIR=bin-$$UCMODEL + LIBS += -L$$[QT_INSTALL_PREFIX]/bsp/lib/$$BSP + LIBS += -lbsp -lSDLCD -lSDL -lz -lm + SOURCES +=$$[QT_INSTALL_PREFIX]/mkspecs/features/simulator/startup.c + SOURCES +=$$[QT_INSTALL_PREFIX]/mkspecs/features/simulator/fs.c + + + INCLUDEPATH+= $$[QT_INSTALL_PREFIX]/bsp/includes/$$BSP + +} + +contains( TEMPLATE, lib ) { + OBJECTS_DIR=obj-$$UCMODEL + DESTDIR=bin-$$UCMODEL + CONFIG+=staticlib +} + +include(../../common/libuc2libs.conf) + +} + + + + + + + + + + + + + + + diff --git a/mkspecs/features/simulator/qplatformdefs.h b/mkspecs/features/simulator/qplatformdefs.h new file mode 100644 --- /dev/null +++ b/mkspecs/features/simulator/qplatformdefs.h @@ -0,0 +1,42 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the qmake spec of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +//#include "../linux-g++/qplatformdefs.h" diff --git a/mkspecs/features/stm32f4/optimised_math.h b/mkspecs/features/stm32f4/optimised_math.h new file mode 100644 --- /dev/null +++ b/mkspecs/features/stm32f4/optimised_math.h @@ -0,0 +1,37 @@ +/*------------------------------------------------------------------------------ +-- This file is a part of the libuc, microcontroler library +-- Copyright (C) 2012, Alexis Jeandet +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation; either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +------------------------------------------------------------------------------- +-- Author : Alexis Jeandet +-- Mail : alexis.jeandet@gmail.com +-------------------------------------------------------------------------------*/ +#ifndef OPTIMISED_MATH_H +#define OPTIMISED_MATH_H +#include + +inline float32_t optimised_sqrt(float32_t value) +{ + float32_t out; + arm_sqrt_f32(value,&out); + return out; +} + +inline float optimised_sin(float32_t x) +{ + return arm_sin_f32(x); +} +#endif diff --git a/mkspecs/features/stm32f4/qmake.conf b/mkspecs/features/stm32f4/qmake.conf new file mode 100644 --- /dev/null +++ b/mkspecs/features/stm32f4/qmake.conf @@ -0,0 +1,77 @@ +# +# qmake configuration for stm32f4 +# +# + + +isEmpty(_stm32f4_conf){ +_stm32f4_conf="oneshot" + +QMAKE_CFLAGS=-mlittle-endian -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -std=c99 + +include(../../common/arm-none-eabi.conf) + +DEFINES += __OPTIMIZED_MATH +DEFINES += \"assert_param(expr)=((void)0)\" +INCLUDEPATH += $$PWD + +DEFINES += __FPU_PRESENT=1 +DEFINES += ARM_MATH_CM4 + +DEFINES += BSP="\"\\\"$$BSP"\\\"\" + +CONFIG += cpu + +contains( TEMPLATE, app ) { + OBJECTS_DIR=obj-$$UCMODEL + DESTDIR=bin-$$UCMODEL + unix:QMAKE_POST_LINK += arm-none-eabi-objcopy -O ihex "$(TARGET)" $$DESTDIR/"$(QMAKE_TARGET).hex" && arm-none-eabi-objcopy -O binary "$(TARGET)" $$DESTDIR/"$(QMAKE_TARGET).bin && python $$[QT_INSTALL_BINS]/dfu.py -b 0x08000000:"$$DESTDIR/"$(QMAKE_TARGET).bin " $$DESTDIR/"$(QMAKE_TARGET).dfu" + win32:QMAKE_POST_LINK += arm-none-eabi-objcopy -O ihex "$(DESTDIR_TARGET)" $$DESTDIR/"$(QMAKE_TARGET).hex" && arm-none-eabi-objcopy -O binary "$(DESTDIR_TARGET)" $$DESTDIR/"$(QMAKE_TARGET).bin" + + LIBS += -L$$[QT_INSTALL_PREFIX]/bsp/lib/$$BSP + LIBS += -lbsp + + + QMAKE_LFLAGS= -mlittle-endian -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -std=c99 -T $$[QT_INSTALL_PREFIX]/mkspecs/features/stm32f4/stm32_flash.ld + + INCLUDEPATH+= $$[QT_INSTALL_PREFIX]/bsp/includes/$$BSP + + SOURCES +=$$[QT_INSTALL_PREFIX]/mkspecs/features/stm32f4/syscalls.c + SOURCES +=$$[QT_INSTALL_PREFIX]/mkspecs/features/stm32f4/fs.c + SOURCES +=$$[QT_INSTALL_PREFIX]/mkspecs/features/stm32f4/startup.s + SOURCES +=$$[QT_INSTALL_PREFIX]/mkspecs/features/stm32f4/cpuinit.c + +# OTHER_FILES += $$[QT_INSTALL_PREFIX]/ucfiles/stm32f4/$$CPU/stm32_flash.ld + + stflash.target = stflash + stflash.commands = cd $$DESTDIR && sudo st-flash write $(QMAKE_TARGET).bin 0x08000000 + dfu.target = dfu + dfu.commands = cd $$DESTDIR && dfu-util d 0483:df11 -c 1 -i 0 -a 0 -s 0x08000000 -D $(QMAKE_TARGET).bin 0x08000000 + QMAKE_EXTRA_TARGETS += stflash dfu +} + +contains( TEMPLATE, lib ) { + CONFIG+=staticlib + OBJECTS_DIR=obj-$$UCMODEL + DESTDIR=bin-$$UCMODEL + message( "You can only build static library for stm32f4" ) +} + +include(../../common/libuc2libs.conf) + +} + + + + + + + + + + + + + + + diff --git a/mkspecs/features/stm32f4/qplatformdefs.h b/mkspecs/features/stm32f4/qplatformdefs.h new file mode 100644 --- /dev/null +++ b/mkspecs/features/stm32f4/qplatformdefs.h @@ -0,0 +1,42 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the qmake spec of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +//#include "../linux-g++/qplatformdefs.h" diff --git a/mkspecs/features/ucswitch.prf b/mkspecs/features/ucswitch.prf --- a/mkspecs/features/ucswitch.prf +++ b/mkspecs/features/ucswitch.prf @@ -8,11 +8,10 @@ contains( TEMPLATE, app ) { } } -#contains( TEMPLATE, lib ) { - !isEmpty( UCMODEL ) { - include(../$$UCMODEL/qmake.conf) - } -#} +!isEmpty( UCMODEL ) { + include(./$$UCMODEL/cpu.pri) + include(./$$UCMODEL/qmake.conf) +} @@ -31,4 +30,3 @@ contains( TEMPLATE, app ) { - diff --git a/mkspecs/simulator/qmake.conf b/mkspecs/simulator/qmake.conf deleted file mode 100644 --- a/mkspecs/simulator/qmake.conf +++ /dev/null @@ -1,57 +0,0 @@ -# -# qmake configuration for stm32f4 -# -# - - -isEmpty(_simulator_conf){ -_simulator_conf="oneshot" - -QMAKE_CFLAGS= -std=c99 - -include(../common/simulator.conf) - -DEFINES += \"assert_param(expr)=((void)0)\" -INCLUDEPATH += $$PWD /usr/include/SDL - -DEFINES += BSP="\"\\\"$$BSP"\\\"\" - -CONFIG += cpu - -contains( TEMPLATE, app ) { - OBJECTS_DIR=obj-$$UCMODEL - DESTDIR=bin-$$UCMODEL - LIBS += -L$$[QT_INSTALL_PREFIX]/bsp/lib/$$BSP - LIBS += -lbsp -lSDLCD -lSDL -lz -lm - SOURCES +=$$[QT_INSTALL_PREFIX]/mkspecs/features/simulator/startup.c - SOURCES +=$$[QT_INSTALL_PREFIX]/mkspecs/features/simulator/fs.c - - - INCLUDEPATH+= $$[QT_INSTALL_PREFIX]/bsp/includes/$$BSP - -} - -contains( TEMPLATE, lib ) { - OBJECTS_DIR=obj-$$UCMODEL - DESTDIR=bin-$$UCMODEL - CONFIG+=staticlib -} - -include(../common/libuc2libs.conf) - -} - - - - - - - - - - - - - - - diff --git a/mkspecs/simulator/qplatformdefs.h b/mkspecs/simulator/qplatformdefs.h deleted file mode 100644 --- a/mkspecs/simulator/qplatformdefs.h +++ /dev/null @@ -1,42 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the qmake spec of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -//#include "../linux-g++/qplatformdefs.h" diff --git a/mkspecs/stm32f4/optimised_math.h b/mkspecs/stm32f4/optimised_math.h deleted file mode 100644 --- a/mkspecs/stm32f4/optimised_math.h +++ /dev/null @@ -1,37 +0,0 @@ -/*------------------------------------------------------------------------------ --- This file is a part of the libuc, microcontroler library --- Copyright (C) 2012, Alexis Jeandet --- --- This program is free software; you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation; either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -------------------------------------------------------------------------------- --- Author : Alexis Jeandet --- Mail : alexis.jeandet@gmail.com --------------------------------------------------------------------------------*/ -#ifndef OPTIMISED_MATH_H -#define OPTIMISED_MATH_H -#include - -inline float32_t optimised_sqrt(float32_t value) -{ - float32_t out; - arm_sqrt_f32(value,&out); - return out; -} - -inline float optimised_sin(float32_t x) -{ - return arm_sin_f32(x); -} -#endif diff --git a/mkspecs/stm32f4/qmake.conf b/mkspecs/stm32f4/qmake.conf deleted file mode 100644 --- a/mkspecs/stm32f4/qmake.conf +++ /dev/null @@ -1,77 +0,0 @@ -# -# qmake configuration for stm32f4 -# -# - - -isEmpty(_stm32f4_conf){ -_stm32f4_conf="oneshot" - -QMAKE_CFLAGS=-mlittle-endian -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -std=c99 - -include(../common/arm-none-eabi.conf) - -DEFINES += __OPTIMIZED_MATH -DEFINES += \"assert_param(expr)=((void)0)\" -INCLUDEPATH += $$PWD - -DEFINES += __FPU_PRESENT=1 -DEFINES += ARM_MATH_CM4 - -DEFINES += BSP="\"\\\"$$BSP"\\\"\" - -CONFIG += cpu - -contains( TEMPLATE, app ) { - OBJECTS_DIR=obj-$$UCMODEL - DESTDIR=bin-$$UCMODEL - unix:QMAKE_POST_LINK += arm-none-eabi-objcopy -O ihex "$(TARGET)" $$DESTDIR/"$(QMAKE_TARGET).hex" && arm-none-eabi-objcopy -O binary "$(TARGET)" $$DESTDIR/"$(QMAKE_TARGET).bin && python $$[QT_INSTALL_BINS]/dfu.py -b 0x08000000:"$$DESTDIR/"$(QMAKE_TARGET).bin " $$DESTDIR/"$(QMAKE_TARGET).dfu" - win32:QMAKE_POST_LINK += arm-none-eabi-objcopy -O ihex "$(DESTDIR_TARGET)" $$DESTDIR/"$(QMAKE_TARGET).hex" && arm-none-eabi-objcopy -O binary "$(DESTDIR_TARGET)" $$DESTDIR/"$(QMAKE_TARGET).bin" - - LIBS += -L$$[QT_INSTALL_PREFIX]/bsp/lib/$$BSP - LIBS += -lbsp - - - QMAKE_LFLAGS= -mlittle-endian -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -std=c99 -T $$[QT_INSTALL_PREFIX]/mkspecs/features/stm32f4/stm32_flash.ld - - INCLUDEPATH+= $$[QT_INSTALL_PREFIX]/bsp/includes/$$BSP - - SOURCES +=$$[QT_INSTALL_PREFIX]/mkspecs/features/stm32f4/syscalls.c - SOURCES +=$$[QT_INSTALL_PREFIX]/mkspecs/features/stm32f4/fs.c - SOURCES +=$$[QT_INSTALL_PREFIX]/mkspecs/features/stm32f4/startup.s - SOURCES +=$$[QT_INSTALL_PREFIX]/mkspecs/features/stm32f4/cpuinit.c - -# OTHER_FILES += $$[QT_INSTALL_PREFIX]/ucfiles/stm32f4/$$CPU/stm32_flash.ld - - stflash.target = stflash - stflash.commands = cd $$DESTDIR && sudo st-flash write $(QMAKE_TARGET).bin 0x08000000 - dfu.target = dfu - dfu.commands = cd $$DESTDIR && dfu-util d 0483:df11 -c 1 -i 0 -a 0 -s 0x08000000 -D $(QMAKE_TARGET).bin 0x08000000 - QMAKE_EXTRA_TARGETS += stflash dfu -} - -contains( TEMPLATE, lib ) { - CONFIG+=staticlib - OBJECTS_DIR=obj-$$UCMODEL - DESTDIR=bin-$$UCMODEL - message( "You can only build static library for stm32f4" ) -} - -include(../common/libuc2libs.conf) - -} - - - - - - - - - - - - - - - diff --git a/mkspecs/stm32f4/qplatformdefs.h b/mkspecs/stm32f4/qplatformdefs.h deleted file mode 100644 --- a/mkspecs/stm32f4/qplatformdefs.h +++ /dev/null @@ -1,42 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the qmake spec of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -//#include "../linux-g++/qplatformdefs.h"