mml 0 January 13, 2017 Posted January 13, 2017 · Report post Пробовал так: char s[256]; sprintf(&s,"APL: %f", 12.345); sprintf(&s,"APL: %F", 12.345); sprintf(&s,"APL: %e", 12.345); sprintf(&s,"APL: %E", 12.345); Там где должно появиться float число, пустое место (не вставляются никакие символы). Целые числа, строки и символы выводятся нормально. Quote Share this post Link to post Share on other sites More sharing options...
Alechek 0 January 13, 2017 Posted January 13, 2017 · Report post 1. включена ли поддержка float в библиотеке? 2. выравнивание стека по 8? Quote Share this post Link to post Share on other sites More sharing options...
mml 0 January 13, 2017 Posted January 13, 2017 · Report post 1. включена ли поддержка float в библиотеке? В настройках поставлена галочка Use float with nano printf для включения опции -u _printf_float. Эта опция не помогает. 2. выравнивание стека по 8? Не знаю как настроить такое выравнивание. Quote Share this post Link to post Share on other sites More sharing options...
k000858 0 January 13, 2017 Posted January 13, 2017 · Report post В настройках поставлена галочка Use float with nano printf для включения опции -u _printf_float. Эта опция не помогает. Не знаю как настроить такое выравнивание. в настройках адреса начала стека Quote Share this post Link to post Share on other sites More sharing options...
mml 0 January 13, 2017 Posted January 13, 2017 · Report post в настройках адреса начала стека _estack = 0x20010000; Quote Share this post Link to post Share on other sites More sharing options...
novikovfb 0 January 13, 2017 Posted January 13, 2017 · Report post В настройках поставлена галочка Use float with nano printf для включения опции -u _printf_float. nano printf - очень похоже на printf без поддержки плавающей запятой. Ищите опцию включения полнофункциональной printf Quote Share this post Link to post Share on other sites More sharing options...
mml 0 January 13, 2017 Posted January 13, 2017 · Report post Ищите опцию включения полнофункциональной printf В этом и смысл моего обращения на форум. Я не знаю как ее включить. Quote Share this post Link to post Share on other sites More sharing options...
jcxz 7 January 13, 2017 Posted January 13, 2017 · Report post В этом и смысл моего обращения на форум. Я не знаю как ее включить. Этого тут никто не знает, так как не можем телепатировать какой у Вас компилятор. Quote Share this post Link to post Share on other sites More sharing options...
_Pasha 0 January 13, 2017 Posted January 13, 2017 (edited) · Report post не будем телепатировать. будем предполагать дефолтный GCC для арм LD_FLAGS += -nostartfiles LD_FLAGS += --specs=nano.specs LD_FLAGS += -fno-exceptions -fno-rtti LD_FLAGS += -Wl,--gc-sections LD_FLAGS += -lc -lnosys LD_FLAGS += -lm LD_FLAGS += -u _scanf_float LD_FLAGS += -u _printf_float LD_FLAGS += -T$(LD_SCRIPT) флаги из реально как печатающего так и ожидающего на вход плавучку проекта. Edited January 13, 2017 by _Pasha Quote Share this post Link to post Share on other sites More sharing options...
mml 0 January 13, 2017 Posted January 13, 2017 · Report post Этого тут никто не знает, так как не можем телепатировать какой у Вас компилятор. gcc Quote Share this post Link to post Share on other sites More sharing options...
mml 0 January 13, 2017 Posted January 13, 2017 (edited) · Report post Не работает, только при вызове из задачи FREE RTOS. Вне FREE RTOS работает. Edited January 13, 2017 by mml Quote Share this post Link to post Share on other sites More sharing options...
AHTOXA 1 January 13, 2017 Posted January 13, 2017 · Report post Значит, у вас стек задачи не выровнен на границу 8 байт. Quote Share this post Link to post Share on other sites More sharing options...
Сергей Борщ 4 January 13, 2017 Posted January 13, 2017 · Report post Не работает, только при вызове из задачи FREE RTOS. Вне FREE RTOS работает. 2. выравнивание стека по 8? "Совпадение? Не думаю!" Quote Share this post Link to post Share on other sites More sharing options...
mml 0 January 13, 2017 Posted January 13, 2017 (edited) · Report post Как его выровнять на 8? Использую: #define configMINIMAL_STACK_SIZE ( ( uint16_t ) 1 * 1024 ) Если речь о величине стека на задачу, то она у меня кратна восьми. Edited January 13, 2017 by mml Quote Share this post Link to post Share on other sites More sharing options...
ohmjke 0 January 14, 2017 Posted January 14, 2017 · Report post Как его выровнять на 8? С FreeRTOS не работал, но, к примеру, в TNKernel стеки задач это просто массивы. А массив можно выровнять так: uint32_t stack[STACK_SIZE] __attribute__ ((aligned (8))); Quote Share this post Link to post Share on other sites More sharing options...