Commit Graph

171 Commits

Author SHA1 Message Date
Yaya-Cout
520b88e364 [Liba] Fix build on new GCC versions 2024-12-08 22:10:50 +01:00
Yaya-Cout
73450419bb [Ports] Merge Nspire port and Fxcg improvements
Close #327
2023-06-06 21:28:54 +02:00
circuit10
b44a95a9b3 Casio fx-CG series port (#324)
* Initial test - working on Linux

* Try to make it work with liba

* Stop using liba and the filesystem

* IT WORKS

* Key input, full res, fix some of the crashes

* Fix the hang when doing calculations

* Add some more key mappings

* Fix the square root issue

* Icons

* Better key mappings, brightness control, better gamma correction, more effficient framebuffer

* Cleanup stage 1

* Cleanup stage 2

* Make the build system build a g3a

* Make it not exit when you press the menu button

* Add Casio port to README

* Use omega-master instead of omega-dev

* Fix mistake with cherry-picking in the README

* Fix internal storage crash

* Fix compile error on Numworks calculators

* Upsilon branding

* Sharper icon

* Make the CI work

* Add power off and improve menu

* Map Alpha + up/down to the brightness shortcut

* Add missing file

* Fix web CI build

* Revert "Fix web CI build"

This reverts commit f19657d9fc.

* Change "prizm" to "fxcg"

* Add FASTLOAD option for Add-in Push

* Add some charatcers to the catalog on Casio and improve key mappings

* Build with -Os -flto

* Disable LTO for now as it's causing crashes

* Put back the fonts I accidently changed

I'd like to add an option for this though as I prefer the ones from Epsilon
2023-05-10 18:28:18 +02:00
devdl11
5ed8aef907 Bootloader pre-release 2022-04-25 18:22:19 +02:00
Yaya-Cout
169fb7404e Fix spelling (#128)
* Fix spelling in .cpp files

* Fix spelling in all files
2022-01-20 17:21:35 +01:00
Arthur Camouseigt
1995781a9f [Poincare/IEEE754] Changed methods to use std function
Implemented std::nextafter to replace hand made one.
Methods next and previous are no longer making the difference between -0
and +0

Change-Id: I42e1a073623b70656d9df954694803840cf3088c
2020-11-04 15:30:53 +01:00
Hugo Saint-Vignes
53e204db3a [liba] Add abs function for int
Change-Id: Ic133ff2f34c7ff24ecbec69d5f31e447a72ae4fe
2020-11-04 15:11:43 +01:00
Gabriel Ozouf
15988f0fae [liba/float] Redefined FLT_EPSILON
FLT_EPSILON is now compliant with the definition : the difference
between 1 and the next representable float.

Change-Id: I4f79c3eee93447e76893d850bd84265c9d45aca5
2020-11-04 15:07:19 +01:00
Gabriel Ozouf
0308b18400 [liba/float.h] Comment on FLT_EPSILON's definition
Change-Id: Iac2da58d9a2f8e4b1bb131255341696db99df188
2020-11-04 14:45:35 +01:00
Hugo Saint-Vignes
51f1cdb076 [poincare] Handle rational unit exponents
Change-Id: Id710702dbed19d34992da90978d5823d68abb80a
2020-11-04 14:45:35 +01:00
Émilie Feral
3f6647f3ae [ion][python] Implement an architecture-dependant collect_registers.
setjmp is not guaranteed to collect all registers without modification
on all platforms.

This fixes the following bug: when the pointer of a newly allocated
object on the Python heap is stored in rpb registers on x86_64 arch, it
was not collected by the garbarge collector.
2020-05-18 14:39:46 +02:00
Romain Goyet
240e60cb68 [liba] Include strlcat in the bridge too 2020-04-15 09:16:32 -04:00
Romain Goyet
cbb0110c2f [liba] Define UINT8_MAX
This will be needed in python to check that some QSTRs aren't too big.
And it doesn't cost anything to add it straight away.
2020-04-14 01:17:25 -07:00
Léa Saviot
2ed354710f [build/simulator] NDEBUG flag in release mode
This way, asserts are not performed on simulator platforms
2020-04-10 00:49:15 -07:00
Léa Saviot
449b1a4fc4 [liba/openbds] Use OpenBSD and not FreeBSD s_erff.c and s_logbf.c files 2020-04-09 13:58:56 +02:00
Neven Sajko
201ecaef5b Performance fixes relating to floating point: erf and erfc
erf and erfc are missing float versions, so I import them from
openlibm. erf is used from Poincare::NormalDistribution::
StandardNormalCumulativeDistributiveFunctionAtAbscissa<float>, and erfc
is used (?) just from MicroPython.

To clarify, if there is no float version of a function like erf, but
there is a double version, C++ promotes the possible float parameter to
double and soft-float hilarity ensues.
2020-04-09 13:58:56 +02:00
Neven Sajko
bdc5be94b6 Performance fixes relating to floating point
Removes unneccesary usage of soft-float double usage. The reason for the
useless double math being done were broken standard C++ functions:
atanh<float>, sqrt<float>, asinh<float>, operator/<float>. This was in
turn caused by missing float versions of C++ functions hypot, atan2,
logb, scalbn.

A logbf implementation was missing from the libm, so I added one from
openlibm.
2020-04-09 13:58:56 +02:00
Romain Goyet
a840e7fb05 [liba] Define SEEK_CUR
For some reason it was defined in Python and raised re-def errors
2020-04-06 09:51:04 +02:00
Jacob Young
a8783fe21f Remove a duplicate function, cleanup sorting and use consistent argument names in math.h.
Add missing math.h tests and make each test a single line for easier comparison with math.h.
Add missing cmath undefs and functions and use constexpr instead of static.
2020-03-16 15:00:40 +01:00
Romain Goyet
269305c68f [liba] Simplify strlcat 2020-02-17 10:31:24 -05:00
Romain Goyet
02a19fc83d [liba] Add strlcat 2020-02-17 10:31:24 -05:00
Romain Goyet
dc4f43eeb0 [liba] Improve strlcpy
Use memcpy (can be optimized) and return the correct size
2020-02-17 10:31:24 -05:00
Léa Saviot
0a21ed2cfb [liba] strlcpy third argument in size, not length 2020-02-12 15:13:17 +01:00
Léa Saviot
0a1c6a3d1d [poincare/tree_pool] Store node offsets, not node pointers
This saves place because we store uint16_t, not uint32_t
2020-02-12 15:13:16 +01:00
Émilie Feral
36278b5aec Merge branch 'master' into version-12 2019-09-18 11:00:03 +02:00
Romain Goyet
9db16997af [liba] Update the bool type to use _Bool
_Bool is defined in C99 which we use already. In practice it's 1 byte
just like char, so this shouldn't have any impact on the built object.

But this patch removes LTO errors when linking C code with C++ code.
Indeed, the linker would raise type mismatch because in C++ bool is
defined to _Bool whereas in C it would be defined to char.
2019-09-18 10:52:20 +02:00
Émilie Feral
059c596a80 Makefiles: avoid building all sources for each target; introduce more
modularity
2019-08-08 17:22:01 +02:00
Émilie Feral
51284296e7 [ion][liba] Add 'noinline' attribute for symbols that have to be in
internal flash (we don't need to consider these symbol dependencies
though)
2019-08-08 15:54:42 +02:00
Léa Saviot
a450ce3855 Merge branch 'master' into f7 2019-08-06 17:40:14 +02:00
Ruben Dashyan
f8fd654157 [liba/stdint] Define int16_t limits 2019-07-30 14:15:08 +02:00
Romain Goyet
d8199ff186 [liba] Define calloc
To silence a warning in LZ4. The code is not even built.
2019-05-28 16:47:03 +02:00
Romain Goyet
4f1d74f44b [build] Use an out-of-tree build 2019-03-06 15:00:59 +01:00
Ruben Dashyan
efde8c6c9e [liba] Add strncmp 2018-11-23 12:04:05 +01:00
Damien Nicolet
79bfc7f112 [code] time module 2018-11-09 01:30:22 +01:00
Romain Goyet
fc80180d46 [liba] Define ptrdiff_t 2018-10-19 10:59:17 +02:00
Léa Saviot
1467d67c0b [liba] Fix strlcpy test 2018-10-17 11:22:37 +02:00
Léa Saviot
d12da1459a [liba] strlcpy(dst, src, dstsize) returns strlen(src) 2018-10-17 11:22:37 +02:00
Romain Goyet
6f7063dfda [liba] Make sure memset and memcpy are always kept at link time
Works around a bug in GCC
2018-10-12 14:39:26 +02:00
Émilie Feral
c95c3145bc Merge remote-tracking branch 'github/master' into Tree 2018-09-13 17:03:31 +02:00
Émilie Feral
a1bcbe28e6 [quiz] Turn all assert in quiz_assert 2018-08-28 10:40:52 +02:00
Romain Goyet
40f499b594 Switch to libgcc entierly when using gcc as a toolchain 2018-08-24 17:44:35 +02:00
Damien Nicolet
a4abd5e34c Add option USE_LIBGCC to link agains libgcc instead of liba softfloat implementation. 2018-08-24 17:44:35 +02:00
Émilie Feral
e7619633bd [liba] Add fmax in math.h header 2018-07-18 16:32:49 +02:00
Émilie Feral
2a05247629 [liba] Add hypot in math.h header 2018-07-18 16:32:49 +02:00
Romain Goyet
55e4c955f4 Upgrade to MicroPython 1.9.3 2018-04-09 14:43:15 +02:00
Émilie Feral
ecb7ec403a [liba] Use softfloat IEEE754 getters implementation instead of
re-implementing them
2018-03-21 15:54:58 +01:00
Émilie Feral
e7963332f6 [liba] Wrong signature in EABI implementation 2018-02-09 21:44:13 +01:00
Émilie Feral
90a75a320b [liba] Add __aeabi_ul2d implementation 2018-01-23 10:24:52 +01:00
Émilie Feral
3f0328f5b5 Add assertions for dangerous bit shift that could trigger undefined
behaviour

Change-Id: I051ed229d407eafcae1ea4b5fc745176a751e036
2017-12-01 11:53:55 +01:00
Léa Saviot
92789330de [code] Search function in the code Toolbox.
When the user types a letter, the toolbox scrolls to the first row that begins
with said letter (without considering if it is lower or upper case). If
there is not such a row, the toolbox scrolls to the first row that has a
letter higher than the typed letter.

Change-Id: I353d23560d8a4d618d96426c393b024e7fb487af
2017-11-21 17:30:04 +01:00